36件ヒット
[1-36件を表示]
(0.039秒)
キーワード
-
NEWS for Ruby 2
. 5 . 0 (7) -
NEWS for Ruby 3
. 0 . 0 (4) -
NEWS for Ruby 3
. 1 . 0 (3) - Ruby用語集 (11)
検索結果
-
bigdecimal (38616.0)
-
bigdecimal は浮動小数点数演算ライブラリです。 任意の精度で 10 進表現された浮動小数点数を扱えます。
...bigdecimal は浮動小数点数演算ライブラリです。
任意の精度で 10 進表現された浮動小数点数を扱えます。
//emlist[][ruby]{
require 'bigdecimal'
a = BigDecimal("0.123456789123456789")
b = BigDecimal("123456.78912345678", 40)
print a + b # => 0.123456912580245903456......ります。
//emlist[][ruby]{
require "bigdecimal"
BigDecimal("1.0") / BigDecimal("0.0") #=> Infinity
BigDecimal("-1.0") / BigDecimal("0.0") #=> -Infinity
//}
無限大を表す BigDecimal オブジェクトを作成する場合、
Kernel.#BigDecimal の引数に "Infinity" や "-Infinity" を......t[digits.txt][ruby]{
0.1
0.1
0.1
//}
//emlist[][ruby]{
require "bigdecimal"
File::open("digits.txt", "r") do |file|
s = BigDecimal("0")
while line = file.gets
s = s + BigDecimal(line)
end
puts s # => 0.3e0
end
File::open("digits.txt", "r") do |file|
s = 0
while line = file.gets... -
NEWS for Ruby 2
. 5 . 0 (132.0) -
NEWS for Ruby 2.5.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...ir
* Dir.glob :base というキーワード引数を追加しました 13056
* Dir.chdir (ブロックなしで呼び出した場合), Dir.open, Dir.new, Dir.mkdir, Dir.rmdir,
Dir.empty? はGVLを解放するようになりました
* Dir.children を追加 11302
* Dir.each_c......r#anybits?, Integer#nobits? を追加 12753
* Integer.sqrt を追加 13219
* Kernel
* Object#yield_self を追加 6721
* Kernel.#pp をrequireなしで使えるようにしました 14123
* Kernel.#warn :uplevel というキーワード引数を追加しました 12882
* Met......24
=== 標準添付ライブラリの更新
* bigdecimal
* BigDecimal 1.3.4 に更新
* BigDecimal::VERSION を追加
* 非推奨(1.4.0で削除予定)
* BigDecimal.new
* BigDecimal.ver
* BigDecimal#clone と BigDecimal#dup は新しいインスタンスを作らな... -
NEWS for Ruby 3
. 0 . 0 (108.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...wait(io, events, timeout)` in a non-blocking execution context. 16786
* Kernel
* Kernel#clone when called with the `freeze: false` keyword will call `#initialize_clone` with the `freeze: false` keyword. 14266
* Kernel#clone when called with the `freeze: true` keyword will call `#initialize......3768
* Warning
* Warning#warn now supports a category keyword argument. 17122
== Stdlib updates
Outstanding ones only.
* BigDecimal
* Update to BigDecimal 3.0.0
* This version is Ractor compatible.
* Bundler
* Update to Bundler 2.2.3
* CGI
* Update to 0.2.0
* This......efault.
* OpenStruct
* Initialization is no longer lazy. 12136
* Builtin methods can now be overridden safely. 15409
* Implementation uses only methods ending with `!`.
* Ractor compatible.
* Improved support for YAML. 8382
* Use officially discouraged. Read OpenStruct@Cave... -
Ruby用語集 (60.0)
-
Ruby用語集 A B C D E F G I J M N O R S Y
...存在する。
オブジェクト空間に関する情報は ObjectSpace クラスで得ることが
できる。
: オープンクラス
: open class
組込みのクラスが再定義可能であること。
Ruby は String や Integer といった基本的なクラスも自由に改変......る時点において、そこに至るメソッド呼び出し元情報を遡るデータ。
バックトレースともいう。
Kernel.#caller_locations、Kernel.#caller で現時点までの
スタックトレースを得ることができる。
また、例外オブジェクトは例......点の位置を指数部の値によって動かしていることに
なるのでこの名がある。
Ruby では Float クラスおよび BigDecimal クラスで
実装されている。
: 振舞い駆動開発(ビヘイビア駆動開発)
: BDD: behavior driven development
テス... -
NEWS for Ruby 3
. 1 . 0 (42.0) -
NEWS for Ruby 3.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...ます。 10917
* Integer
* 新規メソッド
* Integer.try_convert が追加されました。 15211
* Kernel
* 変更されたメソッド
* Kernel#load が第2引数にモジュールを渡せるようになり、渡されたモジュールをトップレベルのモジ......は fork(2) のコアメソッドです。このメソッドを直接呼び出さないでください。既存のforkメソッド(Kernel.#fork、Process.fork、IO.popen("-"))によって呼び出されます。アプリケーションモニタリングライブラリは、このメソッドを上......バグ修正を除く)
* 以下のdefault gemsが更新されました。
* RubyGems 3.3.3
* base64 0.1.1
* benchmark 0.2.0
* bigdecimal 3.1.1
* bundler 2.3.3
* cgi 0.3.1
* csv 3.2.2
* date 3.2.2
* did_you_mean 1.6.1
* digest 3.1.0
* drb 2.1.0
* erb...