29件ヒット
[1-29件を表示]
(0.034秒)
種類
- クラス (12)
- インスタンスメソッド (12)
- 文書 (5)
ライブラリ
- ビルトイン (24)
クラス
- Object (12)
キーワード
-
NEWS for Ruby 3
. 0 . 0 (5) - Numeric (12)
検索結果
-
Object
# method(name) -> Method (18266.0) -
オブジェクトのメソッド name をオブジェクト化した Method オブジェクトを返します。
...
Method オブジェクトを返します。
@param name メソッド名をSymbol またはStringで指定します。
@raise NameError 定義されていないメソッド名を引数として与えると発生します。
//emlist[][ruby]{
me = -365.method(:abs)
p me #=> #<Method: Integer#abs>
p......me.call #=> 365
//}
@see Module#instance_method, Method, BasicObject#__send__, Object#send, Kernel.#eval, Object#singleton_method... -
NEWS for Ruby 3
. 0 . 0 (162.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...a=>1}] # and deprecation 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......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. 16961
* Enumerable#grep and Enumerable#grep_v when passed a Regexp and no block no longer modi......iple times in a method when possible.
* Optimize accesses in some core classes like Hash and their subclasses.
* Method inlining support for some C methods
* `Kernel`: `#class`, `#frozen?`
* `Integer`: `#-@`, `#~`, `#abs`, `#bit_length`, `#even?`, `#integer?`, `#magnitude... -
Numeric (118.0)
-
数値を表す抽象クラスです。Integer や Float などの数値クラス は Numeric のサブクラスとして実装されています。
...数値を表す抽象クラスです。Integer や Float などの数値クラス
は Numeric のサブクラスとして実装されています。
演算や比較を行うメソッド(+, -, *, /, <=>)は Numeric のサブクラスで定義されま
す。Numeric で定義されているメソッ......meric Integer Fixnum Bignum Float Rational Complex
-------------------------------------------------------------------------------------------
abs | o - o o o - o
abs2 |......o o -
singleton_method_added | o - - - - - -
size | - - o o - - -
Numeric Integer Fixnum Bignum Float......Numeric Integer Float Rational Complex
--------------------------------------------------------------------------------
abs | o o o o o
abs2 | o - -......der | o o - - -
round | o o o o -
singleton_method_added | o - - - -
size | - o - - -...