47件ヒット
[1-47件を表示]
(0.036秒)
種類
- 文書 (25)
- インスタンスメソッド (22)
ライブラリ
- ビルトイン (22)
クラス
- Method (11)
- UnboundMethod (11)
キーワード
-
NEWS for Ruby 2
. 2 . 0 (10) -
NEWS for Ruby 3
. 0 . 0 (4) - Ruby用語集 (11)
検索結果
先頭5件
-
Method
# arity -> Integer (18268.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 (18268.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用語集 (144.0)
-
Ruby用語集 A B C D E F G I J M N O R S Y
...大きな整数オブジェクトが属す
クラスだった。Ruby 2.4 で Fixnum と共に Integer に一本化された。
このとき Bignum は形式的には残されたが単なる Integer のエイリアスとなった。
: blade
Ruby の各種メーリングリストのアーカイ......リティー
: arity
メソッドやそれをオブジェクト化した Method オブジェクトの仮引数の数、および
ブロックやそれをオブジェクト化した Proc オブジェクトの
ブロックパラメーターの数。
Method#arity や Proc#arity で得ること......呼び出しとは関係が
なく、再定義もできない。
代入式「n = 1」における「=」は代入演算子である。
「str.size」「user&.name」といったメソッド呼び出しにおける
「.」「&.」も演算子である。
「[*0..9]」におけるいわゆ... -
NEWS for Ruby 2
. 2 . 0 (42.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......しました 9502
* Check_SafeStr -> SafeStringValue
* rb_check_safe_str -> SafeStringValue
* rb_quad_pack -> rb_integer_pack
* rb_quad_unpack -> rb_integer_unpack
* rb_read_check : access struct FILE internal. no replacement.
* rb_struct_iv_get : internal function. no repla... -
NEWS for Ruby 3
. 0 . 0 (36.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......>(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` constants are no longer defined.
* Integer#zero? overrides Numeric#zero? for optimization. 169......* 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...