るりまサーチ

最速Rubyリファレンスマニュアル検索!
29件ヒット [1-29件を表示] (0.167秒)
トップページ > クエリ:-[x] > クエリ:r[x] > クエリ:h[x] > クエリ:to_proc[x]

別のキーワード

  1. _builtin to_h
  2. hash to_h
  3. array to_h
  4. struct to_h
  5. env to_h

ライブラリ

クラス

キーワード

検索結果

Hash#to_proc -> Proc (27413.0)

self のキーに対応する値を返す Proc オブジェクトを返します。

...self のキーに対応する値を返す Proc オブジェクトを返します。

//emlist[][ruby]{
h
= {1 => 10, 2 => 20, 3 => 30}
[1, 2, 3].map(&h) # => [10, 20, 30]
//}...

Method#to_proc -> Proc (27407.0)

self を call する Proc オブジェクトを生成して返します。

...self を call する Proc オブジェクトを生成して返します。

//emlist[例][ruby]{
class Foo
def foo
"foo"
end
end

m = Foo.new.method(:foo) # => #<Method: Foo#foo>
pr = m.to_proc # => #<Proc:0x007f874d026008 (lambda)>
pr.call # => "foo"
//}...

NEWS for Ruby 2.7.0 (3468.0)

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

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

それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス...
...トは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。

== 2.6.0 以降の変更

=== 言語仕様の変更

==== パターンマッチ

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

//emlist[][ruby]{
case [0, [1, 2, 3]]
in...
...Enumeratorを作成するための
Enumerator.produceメソッドが追加されました。 14781
* lazy enumerator から lazy ではない enumerator を生成する
Enumerator::Lazy#eagerメソッドが追加されました。 15901
* Enumerator::Yielder#to_procメソ...

NEWS for Ruby 3.0.0 (3312.0)

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

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

それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス...
...ord arguments are now separated from positional arguments.
Code that resulted in deprecation warnings in Ruby 2.7 will now
r
esult in ArgumentError or different behavior. 14183
* Procs accepting a single rest argument and keywords are no longer
subject to autosplatting. This now matche...
...precation warning
# 3.0 => a=>1}, {}]
//}

* Arguments forwarding (`...`) now supports leading arguments.
16378

//emlist{
def method_missing(meth, ...)
send(:"do_#{meth}", ...)
end
//}

* Pattern matching (`case/in`) is no longer experimental. 17260
* One-line pattern matching is re...