You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it"complain about modification of produced mutable strings"do
52
+
->{eval(<<~RUBY)}.shouldcomplain(/warning: literal string will be frozen in the future \(run with --debug-frozen-string-literal for more information\)/)
53
+
"test" << "!"
54
+
RUBY
55
+
end
56
+
57
+
it"does not complain about modification if Warning[:deprecated] is false"do
58
+
deprecated=Warning[:deprecated]
59
+
Warning[:deprecated]=false
60
+
->{eval(<<~RUBY)}.should_notcomplain
61
+
"test" << "!"
62
+
RUBY
63
+
ensure
64
+
Warning[:deprecated]=deprecated
65
+
end
66
+
end
47
67
end
48
68
49
69
it"if file has frozen_string_literal:true comment produce same frozen strings each time"do
0 commit comments