るりまサーチ

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

別のキーワード

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

検索結果

NEWS for Ruby 2.7.0 (66.0)

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

...ingPatternError
//}

//emlist{
json
= <<END
{
"name": "Alice",
"age": 30,
"children": [{ "name": "Bob", "age": 2 }]
}
END

JSON
.parse(json, symbolize_names: true) in {name: "Alice", children: [{name: name, age: age}]}

p name #=> "Bob"
p age #=> 2

JSON
.parse(json, symbolize_names: true) in {...
...rning: `_1' is reserved for numbered parameter; consider another name
[1].each { p _1 } # prints 0 instead of 1

==== ブロックなしの proc/lambda が deprecated

* ブロック付きで呼び出されたメソッドの中で、ブロックなしでProc.newやKernel#procを
呼び出す...
...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...