Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions language/predefined_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,15 @@ def foo
$/ = str
$/.should.equal?(str)
end

it "assigns the default separator if the given String is equal to it" do
default = "\n"
str = "\n".dup.freeze
$/ = str
$/.should_not.equal?(str)
$/.should.frozen?
$/.should == default
end
end

it "can be assigned nil" do
Expand Down Expand Up @@ -801,6 +810,15 @@ def foo
$-0 = str
$-0.should.equal?(str)
end

it "assigns the default separator if the given String is equal to it" do
default = "\n"
str = "\n".dup.freeze
$-0 = str
$-0.should_not.equal?(str)
$-0.should.frozen?
$-0.should == default
end
end

it "can be assigned nil" do
Expand Down
Loading