16件ヒット
[1-16件を表示]
(0.018秒)
検索結果
-
Complex
# clamp(range) -> object (39101.0) -
@undef
@undef -
NEWS for Ruby 2
. 7 . 0 (60.0) -
NEWS for Ruby 2.7.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...的に導入されました。
caseやComparable#clampや定数やDSLなどで便利かもしれません。
14799
//emlist[][ruby]{
ary[..3] # identical to ary[0..3]
case RUBY_VERSION
when ..."2.4" then puts "EOL"
# ...
end
age.clamp(..100)
where(sales: ..100)
//}
* 「$;」にnil......#clampがRangeを引数として受け付けるようになりました。 14784
//emlist[][ruby]{
-1.clamp(0..2) #=> 0
1.clamp(0..2) #=> 1
3.clamp(0..2) #=> 2
# With beginless and endless ranges:
-1.clamp(0..) #=> 0
3.clamp(..2) #=> 2
//}
* Complex
* 新規メソッド
* Complex#...