summaryrefslogtreecommitdiff
path: root/spec/ruby/core/bignum/shared/abs.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/bignum/shared/abs.rb')
-rw-r--r--spec/ruby/core/bignum/shared/abs.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/ruby/core/bignum/shared/abs.rb b/spec/ruby/core/bignum/shared/abs.rb
new file mode 100644
index 0000000000..35fd85060c
--- /dev/null
+++ b/spec/ruby/core/bignum/shared/abs.rb
@@ -0,0 +1,6 @@
+describe :bignum_abs, shared: true do
+ it "returns the absolute value" do
+ bignum_value(39).send(@method).should == 9223372036854775847
+ (-bignum_value(18)).send(@method).should == 9223372036854775826
+ end
+end