36件ヒット
[1-36件を表示]
(0.060秒)
種類
- 文書 (25)
- インスタンスメソッド (11)
ライブラリ
- ビルトイン (11)
クラス
- UnboundMethod (11)
キーワード
-
NEWS for Ruby 2
. 2 . 0 (10) -
NEWS for Ruby 3
. 0 . 0 (4) - Ruby用語集 (11)
検索結果
-
UnboundMethod
# arity -> Integer (18185.0) -
メソッドが受け付ける引数の数を返します。
...d(: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
String.instanc......e_method(:replace).arity #=> 1
String.instance_method(:squeeze).arity #=> -1
String.instance_method(:count).arity #=> -1
//}... -
NEWS for Ruby 3
. 0 . 0 (264.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...", "f", 3]
in [*pre, String => x, String => y, *post]
p pre #=> ["a", 1]
p x #=> "b"
p y #=> "c"
p post #=> [2, "d", "e", "f", 3]
end
//}
* Endless method definition is added. [EXPERIMENTAL]
16746
//emlist{
def square(x) = x * x
//}
* Interpolated String literals are no lo......nger frozen when
`# frozen-string-literal: true` is used. 17104
* Magic comment `shareable_constant_value` added to freeze constants.
See {Magic Comments}[rdoc-ref:doc/syntax/comments.rdoc@Magic+Comments] for more details.
17273
* A {static analysis}[rdoc-label:label-Static+analysis]......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... -
Ruby用語集 (96.0)
-
Ruby用語集 A B C D E F G I J M N O R S Y
...cent
: 0 オリジン
: zero-based
番号が 0 から始まること。
例えば、
Array や Vector、Matrix などの要素の番号、
String における文字の位置、
といったものは 0 オリジンである。
: 1 オリジン
: one-based
番号が 1 から始まるこ......リティー
: arity
メソッドやそれをオブジェクト化した Method オブジェクトの仮引数の数、および
ブロックやそれをオブジェクト化した Proc オブジェクトの
ブロックパラメーターの数。
Method#arity や Proc#arity で得ること......は
オブジェクトではない。
ただし、メソッド、ブロックはそれぞれオブジェクト化できる。
なお、「String オブジェクト」のような、クラス名+「オブジェクト」の
形の表現は、そのクラスのインスタンスを指す。... -
NEWS for Ruby 2
. 2 . 0 (54.0) -
NEWS for Ruby 2.2.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...を書き込みモードで開くようになりました
* String
* 追加: String#unicode_normalize
* 追加: String#unicode_normalize!
* 追加: String#unicode_normalized?
* Symbol
* 改善: String#to_sym, String#intern によって返される多くのシンボルがGC可......影響のある変更
なし
=== C API の更新
* 非推奨のAPIを削除しました 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 FIL......局、処理された文字列はNULL終端されない可能性があるので、
NULL終端されたCの文字列を入手したいときは`StringValueCStr()`を呼ぶ必要があります。
* rb_tracepoint_new() はCからアクセス可能な新しい内部的なイベントをサポー...