summaryrefslogtreecommitdiff
path: root/spec/ruby/core/math/log10_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/math/log10_spec.rb')
-rw-r--r--spec/ruby/core/math/log10_spec.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/ruby/core/math/log10_spec.rb b/spec/ruby/core/math/log10_spec.rb
index c4daedcd5c..f3bd7fd4b8 100644
--- a/spec/ruby/core/math/log10_spec.rb
+++ b/spec/ruby/core/math/log10_spec.rb
@@ -23,6 +23,10 @@ describe "Math.log10" do
-> { Math.log10("test") }.should raise_error(TypeError)
end
+ it "raises a TypeError if passed a numerical argument as a string" do
+ -> { Math.log10("1.0") }.should raise_error(TypeError)
+ end
+
it "returns NaN given NaN" do
Math.log10(nan_value).nan?.should be_true
end