Skip to content

Commit 0391aea

Browse files
committed
Add String#+@ in conjunction with freeze-magic-comment spec
1 parent a6edbbf commit 0391aea

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# frozen_string_literal: true
2+
3+
print (+ 'frozen string').frozen? ? 'immutable' : 'mutable'

core/string/uplus_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,9 @@
1616

1717
output.equal?(input).should == true
1818
end
19+
20+
it 'returns mutable copy despite freeze-magic-comment in file' do
21+
ruby_exe(fixture(__FILE__, "freeze_magic_comment.rb")).should == 'mutable'
22+
end
1923
end
2024
end

0 commit comments

Comments
 (0)