32件ヒット
[1-32件を表示]
(0.044秒)
別のキーワード
種類
- インスタンスメソッド (21)
- 文書 (11)
ライブラリ
- ビルトイン (21)
クラス
- Method (21)
キーワード
-
NEWS for Ruby 2
. 6 . 0 (6) -
NEWS for Ruby 2
. 7 . 0 (5) - inspect (5)
-
to
_ s (5)
検索結果
先頭5件
-
NEWS for Ruby 2
. 6 . 0 (26090.0) -
NEWS for Ruby 2.6.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...NEWS for Ruby 2.6.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス......* Array#filter! が Array#select! の別名として追加されました。 13784
* Binding
* 新規メソッド
* Binding#source_location 追加 14230
* bindingのソースコード上の位置を __FILE__ と __LINE__ の二要素配列として返します。......作成するディスクリプタに FD_CLOEXEC フラグは設定されます。) 14907
* KeyError
* 新規オプション
* KeyError.new に :receiver と :key にオプションが追加されて
Ruby コードからも設定できるようになりました。 14313
* Met... -
NEWS for Ruby 2
. 7 . 0 (26054.0) -
NEWS for Ruby 2.7.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...NEWS for Ruby 2.7.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス......name: "Alice", children: [{name: "Charlie", age: age}]}
#=> NoMatchingPatternError
//}
* 詳細は https://speakerdeck.com/k_tsj/pattern-matching-new-feature-in-ruby-2-dot-7 のスライドを参照してください。
* スライドは少し古い内容になっていることに注意して......くる情報が増えました。 14145
* Module
* 新規メソッド
* 定数が定義された場所を取得するModule#const_source_location
メソッドが追加されました。 10771
* 通常の引数分解でキーワード引数を渡すようにメソッドに... -
Method
# source _ location -> [String , Integer] | nil (18125.0) -
ソースコードのファイル名と行番号を配列で返します。
...@see Proc#source_location
//emlist[例][ruby]{
# ------- /tmp/foo.rb ---------
class Foo
def foo; end
end
# ----- end of /tmp/foo.rb ----
require '/tmp/foo'
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m.source_location # => ["/tmp/foo.rb", 2]
method(:puts).source_location # => nil
//}... -
Method
# inspect -> String (24.0) -
self を読みやすい文字列として返します。
...Method#source_location を表します。
source_location が nil の場合には付きません。
//emlist[例][ruby]{
module Foo
def foo
"foo"
end
end
class Bar
include Foo
def bar(a, b)
end
end
p Bar.new.method(:foo) # => #<Method: Bar(Foo)#foo() test.rb:2>
p Bar.new.metho... -
Method
# to _ s -> String (24.0) -
self を読みやすい文字列として返します。
...Method#source_location を表します。
source_location が nil の場合には付きません。
//emlist[例][ruby]{
module Foo
def foo
"foo"
end
end
class Bar
include Foo
def bar(a, b)
end
end
p Bar.new.method(:foo) # => #<Method: Bar(Foo)#foo() test.rb:2>
p Bar.new.metho...