summaryrefslogtreecommitdiff
path: root/spec/ruby/library/bigmath
diff options
context:
space:
mode:
authorHiroshi SHIBATA <[email protected]>2024-01-17 13:50:48 +0900
committerHiroshi SHIBATA <[email protected]>2024-01-18 07:44:13 +0900
commit44d74f22c8da3c13aa5363769418e2f5fd29f65a (patch)
tree5e69ded6f2e5e2d3b15ca388285647430217e15a /spec/ruby/library/bigmath
parent4328f190eaae5fc7e15e9889a0d9e7b2b8fa56ab (diff)
Guard bigdecimal related examples
spec/mspec/tool/wrap_with_guard.rb 'ruby_version_is ""..."3.4"' spec/ruby/core/integer/coerce_spec.rb spec/mspec/tool/wrap_with_guard.rb 'ruby_version_is ""..."3.4"' spec/ruby/shared/rational/coerce.rb spec/mspec/tool/wrap_with_guard.rb 'ruby_version_is ""..."3.4"' spec/ruby/library/bigmath/log_spec.rb and example of at_spec.rb
Diffstat (limited to 'spec/ruby/library/bigmath')
-rw-r--r--spec/ruby/library/bigmath/log_spec.rb15
1 files changed, 9 insertions, 6 deletions
diff --git a/spec/ruby/library/bigmath/log_spec.rb b/spec/ruby/library/bigmath/log_spec.rb
index 2ffbf8b6b9..22df38bb29 100644
--- a/spec/ruby/library/bigmath/log_spec.rb
+++ b/spec/ruby/library/bigmath/log_spec.rb
@@ -1,10 +1,13 @@
require_relative '../../spec_helper'
-require 'bigdecimal'
-describe "BigDecimal#log" do
- it "handles high-precision Rational arguments" do
- result = BigDecimal('0.22314354220170971436137296411949880462556361100856391620766259404746040597133837784E0')
- r = Rational(1_234_567_890, 987_654_321)
- BigMath.log(r, 50).should == result
+ruby_version_is ""..."3.4" do
+ require 'bigdecimal'
+
+ describe "BigDecimal#log" do
+ it "handles high-precision Rational arguments" do
+ result = BigDecimal('0.22314354220170971436137296411949880462556361100856391620766259404746040597133837784E0')
+ r = Rational(1_234_567_890, 987_654_321)
+ BigMath.log(r, 50).should == result
+ end
end
end