datamapper / do

DataObjects
147 stars 74 forks source link

Work with ruby 2.3's --enable-frozen-string-literal #90

Open jeremyevans opened 8 years ago

jeremyevans commented 8 years ago

These changes are the minimal ones necessary to allow Sequel's specs to pass. There may well be other changes that are required.

dbussink commented 8 years ago

Curious, how have you been testing this? I tried with RUBYOPT="--enable-frozen-string-literal --debug=frozen-string-literal" but it blows up in other tools like rake and Ruby's own stdlib with that option before it even gets to running any of the DO bits.

jeremyevans commented 8 years ago

RUBYOPT="--enable-frozen-string-literal --debug=frozen-string-literal" rake works for Sequel. To deal with frozen string literal issues in dependencies, clone them locally, and set RUBYLIB to include their lib directory.

If you just want to worry about frozen string issues in do itself, just add the # frozen-string-literal: true code to the top of all of the ruby files, then run the tests as you normally would.