diff options
Diffstat (limited to 'spec/ruby/core/integer/dup_spec.rb')
| -rw-r--r-- | spec/ruby/core/integer/dup_spec.rb | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/spec/ruby/core/integer/dup_spec.rb b/spec/ruby/core/integer/dup_spec.rb index f46bdf89bd..3e5739ad37 100644 --- a/spec/ruby/core/integer/dup_spec.rb +++ b/spec/ruby/core/integer/dup_spec.rb @@ -1,10 +1,13 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' -ruby_version_is '2.4' do - describe "Integer#dup" do - it "returns self" do - int = 2 - int.dup.should equal(int) - end +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 |
