52件ヒット
[1-52件を表示]
(0.014秒)
種類
- 文書 (28)
- インスタンスメソッド (24)
ライブラリ
- ビルトイン (24)
クラス
- Method (12)
- UnboundMethod (12)
キーワード
-
NEWS for Ruby 2
. 2 . 0 (11) -
NEWS for Ruby 3
. 0 . 0 (5) - Ruby用語集 (12)
検索結果
先頭5件
-
Method
# arity -> Integer (18167.0) -
メソッドが受け付ける引数の数を返します。
...c.method(:u).arity #=> 0
p c.method(:v).arity #=> 1
p c.method(:w).arity #=> -1
p c.method(:x).arity #=> 2
p c.method(:y).arity #=> -3
p c.method(:z).arity #=> -3
s = "xyz"
s.method(:size).arity #=> 0
s.method(:replace).arity #=> 1
s.method(:squeeze).arity #=> -1
s.......method(:count).arity #=> -1
//}... -
UnboundMethod
# arity -> Integer (18167.0) -
メソッドが受け付ける引数の数を返します。
...nce_method(:one).arity #=> 0
p C.instance_method(:two).arity #=> 1
p C.instance_method(:three).arity #=> -1
p C.instance_method(:four).arity #=> 2
p C.instance_method(:five).arity #=> -3
p C.instance_method(:six).arity #=> -3
String.instance_method(:size).arity #=> 0
Strin......g.instance_method(:replace).arity #=> 1
String.instance_method(:squeeze).arity #=> -1
String.instance_method(:count).arity #=> -1
//}... -
Ruby用語集 (24.0)
-
Ruby用語集 A B C D E F G I J M N O R S Y
...リティー
: arity
メソッドやそれをオブジェクト化した Method オブジェクトの仮引数の数、および
ブロックやそれをオブジェクト化した Proc オブジェクトの
ブロックパラメーターの数。
Method#arity や Proc#arity で得ること......呼び出しとは関係が
なく、再定義もできない。
代入式「n = 1」における「=」は代入演算子である。
「str.size」「user&.name」といったメソッド呼び出しにおける
「.」「&.」も演算子である。
「[*0..9]」におけるいわゆ... -
NEWS for Ruby 2
. 2 . 0 (12.0) -
NEWS for Ruby 2.2.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...: String#to_sym, String#intern によって返される多くのシンボルがGC可能になりました
* Method
* 追加: Method#curry([arity]) はカリー化された Proc オブジェクトを返します
* 追加: Method#super_method はスーパクラスの同名のメソッドの......しました。メンテナンスしていないコードでした。
* ObjectSpace (after requiring "objspace")
* ObjectSpace.#memsize_of(obj) は sizeof(RVALUE) を含むようになりました。
8984
* prime
* 非互換:
* Prime.prime? は負の数に対して false......tional は隠されました 9513
かわりに rb_rational_num と rb_rational_den を使います
* rb_big_new と rb_big_resize は long のかわりに size_t を受け取ります
* rb_num2long は SIGNED_VALUE のかわりに long を返します
* rb_num2ulong は VALUE のかわ... -
NEWS for Ruby 3
. 0 . 0 (12.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...eql? are now defined and will return true for separate Proc instances if the procs were created from the same block. 14267
* Queue / SizedQueue
* Queue#pop, SizedQueue#push and related methods may now invoke the `block`/`unblock` scheduler hooks in a non-blocking context. 16786
* Ractor......PERIMENTAL: Hash#each consistently yields a 2-element array. 12706
* Now `{ a: 1 }.each(&->(k, v) { })` raises an ArgumentError due to lambda's arity check.
* When writing to STDOUT redirected to a closed pipe, no broken pipe error message will be shown now. 14413
* `TRUE`/`FALSE`/`NIL` con......* Microarchitectural optimizations
* Native functions shared by multiple methods are deduplicated on JIT compaction.
* Decrease code size of hot paths by some optimizations and partitioning cold paths.
* Instance variables
* Eliminate some redundant checks.
* Skip...