1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/spec/ruby/core/numeric/dup_spec.rb
2020-09-17 11:42:26 +02:00

16 lines
319 B
Ruby

require_relative '../../spec_helper'
describe "Numeric#dup" do
it "returns self" do
value = 1
value.dup.should equal(value)
subclass = Class.new(Numeric)
value = subclass.new
value.dup.should equal(value)
end
it "does not change frozen status" do
1.dup.frozen?.should == true
end
end