るりまサーチ

最速Rubyリファレンスマニュアル検索!
10件ヒット [1-10件を表示] (0.184秒)
トップページ > クエリ:I[x] > クエリ:a[x] > クエリ:delegate[x] > クエリ:ruby2_keywords[x]

別のキーワード

  1. forwardable delegate
  2. delegate __getobj__
  3. delegate __setobj__
  4. forwardable instance_delegate
  5. delegate delegateclass

ライブラリ

クラス

検索結果

Module#ruby2_keywords(method_name, ...) -> nil (18399.0)

For the given method names, marks the method as passing keywords through a normal argument splat. This should only be called on methods that accept an argument splat (`*args`) but not explicit keywords or a keyword splat. It marks the method such that if the method is called with keyword arguments, the final hash argument is marked with a special flag such that if it is the final element of a normal argument splat to another method call, and that method call does not include explicit keywords or a keyword splat, the final element is interpreted as keywords. In other words, keywords will be passed through the method to other methods.

...given method names, marks the method as passing keywords through
a
normal argument splat. This should only be called on methods that
a
ccept an argument splat (`*args`) but not explicit keywords or a
keyword splat. It marks the method such that if the method is called
with keyword arguments, the fi...
...f a normal argument splat to
a
nother method call, and that method call does not include explicit
keywords or a keyword splat, the final element is interpreted as
keywords. In other words, keywords will be passed through the method to
other methods.

This should only be used for methods that delegate...
...to this method before calling
i
t. Also, be aware that if this method is removed, the behavior of the
method will change so that it does not pass through keywords.

//emlist[例][ruby]{
module Mod
def foo(meth, *args, &block)
send(:"do_#{meth}", *args, &block)
end
ruby2_keywords
(:foo) if re...

NEWS for Ruby 2.7.0 (198.0)

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

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

== 2.6.0 以降の変更

=== 言語仕様の変更

==== パターンマッチ

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

//emlist[][ruby]{
case [0, [1, 2, 3]]
i
n [a, [b...
...された場所を取得するModule#const_source_location
メソッドが追加されました。 10771
* 通常の引数分解でキーワード引数を渡すようにメソッドに印をつける
Module#ruby2_keywordsを追加しました。
古いRubyと互換性...
...github.com/ruby/ruby/pull/2226

* CSV
* 3.1.2に更新されました。
https://github.com/ruby/csv/blob/master/NEWS.md

* Date
* Date.jisx0301, Date#jisx0301, Date.parseが新しい日本の年号を
サポートしました。 15742

* Delegator
* Object#DelegateClas...