summaryrefslogtreecommitdiff
path: root/spec/ruby/core/range/new_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/range/new_spec.rb')
-rw-r--r--spec/ruby/core/range/new_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/ruby/core/range/new_spec.rb b/spec/ruby/core/range/new_spec.rb
index 85e99babff..3cab887799 100644
--- a/spec/ruby/core/range/new_spec.rb
+++ b/spec/ruby/core/range/new_spec.rb
@@ -65,5 +65,13 @@ describe "Range.new" do
range_exclude.should_not == range_include
end
+
+ it "creates a frozen range if the class is Range.class" do
+ Range.new(1, 2).should.frozen?
+ end
+
+ it "does not create a frozen range if the class is not Range.class" do
+ Class.new(Range).new(1, 2).should_not.frozen?
+ end
end
end