るりまサーチ

最速Rubyリファレンスマニュアル検索!
38件ヒット [1-38件を表示] (0.126秒)

別のキーワード

  1. kernel require
  2. getoptlong require_order
  3. rubygems/custom_require require
  4. irb/ext/use-loader irb_require
  5. require execute

種類

ライブラリ

クラス

オブジェクト

キーワード

検索結果

Readline::HISTORY.<<(string) -> self (24278.0)

ヒストリの最後に string で指定した文字列を追加します。 self を返します。

...tring で指定した文字列を追加します。
self を返します。

@param string 文字列を指定します。

例: "foo"を追加する。

require
"readline"

Readline
::HISTORY << "foo"
p Readline::HISTORY[-1] #=> "foo"

例: "foo"、"bar"を追加する。

require
"readline"...
...Readline::HISTORY << "foo" << "bar"
p Readline::HISTORY[-1] #=> "bar"
p Readline::HISTORY[-2] #=> "foo"

@see Readline::HISTORY.push...

CSV.readlines(path, options = Hash.new) -> [Array] | CSV::Table (6230.0)

CSV ファイルを配列の配列にするために使います。 headers オプションに偽でない値を指定した場合は CSV::Table オブジェクトを返します。

...

@param options CSV.new のオプションと同じオプションを指定できます。
:encoding というキーを使用すると入力のエンコーディングを指定することができます。
入力のエンコーディングか Encoding.default_exter...
...emlist[例][ruby]{
require
"csv"
require
"pp"

File.write("test.csv", <<CSV)
i
d,first name,last name,age
1,taro,tanaka,20
2,jiro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
CSV

pp CSV.read("test.csv")

# => [["id", "first name", "last name", "age"],
# ["1", "taro", "tanaka", "20"],
# ["2", "jiro...
...", "suzuki", "18"],
# ["3", "ami", "sato", "19"],
# ["4", "yumi", "adachi", "21"]]
//}

//emlist[例][ruby]{
require
"csv"

File.write("test.csv", <<CSV)
i
d,first name,last name,age
1,taro,tanaka,20
2,jiro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
CSV

table = CSV.read("test.csv", headers: true...

ruby 1.6 feature (1194.0)

ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。

...ruby 1.6 feature
ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン
になります。

((<stable-snapshot|URL:ftp://ftp.netlab.co.jp/pub/lang/ruby/stable-snapshot.tar.gz>)) は、日々更新される安定版の最新ソースです。

== 1.6.8 (2002-12-24) ->...
...se!
p a
=> ruby 1.6.7 (2002-03-01) [i586-linux]
"KEY"
=> -:3:in `upcase!': can't modify frozen string (TypeError)
from -:3
ruby 1.6.7 (2002-08-01) [i586-linux]

: 2002-06-10 Fixnum#>>, <<

負の数に対して右シフトすると 0...
...[i586-linux]
nil
nil
nil
nil

: 2002-03-14 拡張ライブラリの autoload

拡張ライブラリに対して autoload が効いていませんでした。((<ruby-dev:16379>))

autoload :Fcntl, "fcntl"
require
"fcntl"

=> -:2:in `require':...

NEWS for Ruby 2.7.0 (48.0)

NEWS for Ruby 2.7.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...ルか bugs.ruby-lang.org の issue を参照してください。

== 2.6.0 以降の変更

=== 言語仕様の変更

==== パターンマッチ

* パターンマッチが実験的機能として導入されました。 14912

//emlist[][ruby]{
case [0, [1, 2, 3]]
i
n [a, [b, *c]]
p a #=> 0...
...nd
//}

//emlist[][ruby]{
case {a: 0, b: 1}
i
n {a: 0, x: 1}
:unreachable
i
n {a: 0, b: var}
p var #=> 1
end
//}

//emlist[][ruby]{
case -1
i
n 0 then :unreachable
i
n 1 then :unreachable
end #=> NoMatchingPatternError
//}

//emlist{
json = <<END
{
"name": "Alice",
"age": 30,
"children": [{ "n...
...Enumerator::Lazy#with_indexメソッドが追加され、
以前のlazyではないEnumerator#with_indexのデフォルト実装から
lazyになりました。7877

//emlist[Enumerator.produce][ruby]{
require
"date"
dates = Enumerator.produce(Date.today, &:succ) #=> infinite sequence of da...