-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #297 from timcraft/string-uplus
- Loading branch information
Showing
4 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
require_relative '../../spec_helper' | ||
|
||
describe 'String#+@' do | ||
it 'returns an unfrozen copy of a frozen String' do | ||
input = 'foo'.freeze | ||
output = +input | ||
|
||
output.should_not.frozen? | ||
output.should == 'foo' | ||
end | ||
|
||
it 'returns self if the String is not frozen' do | ||
input = 'foo' | ||
output = +input | ||
|
||
output.equal?(input).should == true | ||
end | ||
|
||
# NATFIXME: Implement fixture method and add freeze_magic_comment.rb fixture | ||
xit 'returns mutable copy despite freeze-magic-comment in file' do | ||
ruby_exe(fixture(__FILE__, "freeze_magic_comment.rb")).should == 'mutable' | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters