summaryrefslogtreecommitdiff
path: root/spec/ruby/core/integer/dup_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/integer/dup_spec.rb')
-rw-r--r--spec/ruby/core/integer/dup_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/ruby/core/integer/dup_spec.rb b/spec/ruby/core/integer/dup_spec.rb
new file mode 100644
index 0000000000..3e5739ad37
--- /dev/null
+++ b/spec/ruby/core/integer/dup_spec.rb
@@ -0,0 +1,13 @@
+require_relative '../../spec_helper'
+
+describe "Integer#dup" do
+ it "returns self for small integers" do
+ integer = 1_000
+ integer.dup.should.equal?(integer)
+ end
+
+ it "returns self for large integers" do
+ integer = 4_611_686_018_427_387_905
+ integer.dup.should.equal?(integer)
+ end
+end