Closed flavorjones closed 6 years ago
@flavorjones Thanks! Looks like tests are failing in older Rubies due to the unknown --enable-frozen-string-literal
option though:
$ bundle exec rake
NOTE: Testing support for frozen string literals
/home/travis/.rvm/rubies/ruby-2.2.2/bin/ruby: warning: unknown argument for --enable: `frozen-string-literal'
/home/travis/.rvm/rubies/ruby-2.2.2/bin/ruby: invalid option --debug=frozen-string-literal (-h will show valid options) (RuntimeError)
rake aborted!
Ugh! Sorry about that. Fix coming ...
All green!
No, sorry, I messed that up. Hang on. Case of the mondays.
@flavorjones Looks like tests are passing now, thanks! Is this ready to merge or should I continue hanging on?
I think you can :shipit: !
Related to https://github.com/flavorjones/loofah/issues/118, I'd like to ensure that Loofah supports Ruby's "frozen string literals" option.
Essentially this PR turns instances of
''
which are mutated into a call toString.new
, which returns mutable strings. All changes were driven by failing tests when this option is set.