るりまサーチ

最速Rubyリファレンスマニュアル検索!
30件ヒット [1-30件を表示] (0.034秒)

別のキーワード

  1. _builtin complex
  2. complex rect
  3. complex polar
  4. kernel complex
  5. complex rationalize

種類

ライブラリ

クラス

キーワード

検索結果

Complex.json_create(hash) -> Complex (27218.0)

JSON のオブジェクトから Complex のオブジェクトを生成して返します。

...JSON のオブジェクトから Complex のオブジェクトを生成して返します。

@param hash 実部をキー 'r'、虚部をキー 'i' に持つハッシュを指定します。...

NEWS for Ruby 2.1.0 (30.0)

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

...付けると虚数単位 i を掛けた数になる
42i # => Complex(0, 42)
3.14i # => Complex(0, 3.14)

# ri を付けると複素数の虚部が有理数になる
42ri # => Complex(0, 42r)
3.14ri # => Complex(0, 3.14r)
//}

* def によるメソッド定義式は nil の...
...うになりました。

* Proc
* Returning from lambda proc now always exits from the Proc, not from the
method where the lambda is created. Returning from non-lambda proc exits
from the method, same as the former behavior.

* String
* 以下のコードでレシーバー...
...名前付きキャプチャをサポートしました

* syslog/logger
* ファイリティを追加

* tempfile
* 追加: Tempfile.create

* timeout
* 明示的に例外クラスを指定しない限り、ブロックを抜けるための例外はブロック内部で rescue...

NEWS for Ruby 2.7.0 (18.0)

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

...で呼び出すと
例外が発生するようになりました。

//emlist[][ruby]{
def bar
lambda
end
bar { puts "Hello" } #=> tried to create Proc object without a block (ArgumentError)
//}

==== その他の変更

* 始端なしRangeが実験的に導入されました。
caseやC...
...clamp(0..2) #=> 1
3.clamp(0..2) #=> 2
# With beginless and endless ranges:
-1.clamp(0..) #=> 0
3.clamp(..2) #=> 2
//}

* Complex
* 新規メソッド
* Complex#<=>が追加されました。
その結果、「0 <=> 0i」がNoMethodErrorを発生しなくなりました。 158...