mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
16 lines
319 B
Ruby
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
|