diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/psych/lib/psych/visitors/to_ruby.rb | 4 | ||||
-rw-r--r-- | ext/syck/lib/syck/rubytypes.rb | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/ext/psych/lib/psych/visitors/to_ruby.rb b/ext/psych/lib/psych/visitors/to_ruby.rb index a68c8e698e..f8b15859e1 100644 --- a/ext/psych/lib/psych/visitors/to_ruby.rb +++ b/ext/psych/lib/psych/visitors/to_ruby.rb @@ -69,9 +69,7 @@ module Psych when 'x' then options |= Regexp::EXTENDED when 'i' then options |= Regexp::IGNORECASE when 'm' then options |= Regexp::MULTILINE - - # FIXME: there is no constant for ARG_ENCODING_NONE - when 'n' then options |= 32 + when 'n' then options |= Regexp::NOENCODING else lang = option end end diff --git a/ext/syck/lib/syck/rubytypes.rb b/ext/syck/lib/syck/rubytypes.rb index 883c8d5bfc..31b1e2b804 100644 --- a/ext/syck/lib/syck/rubytypes.rb +++ b/ext/syck/lib/syck/rubytypes.rb @@ -271,7 +271,7 @@ class Regexp mods |= Regexp::EXTENDED if val['mods'].include?( 'x' ) mods |= Regexp::IGNORECASE if val['mods'].include?( 'i' ) mods |= Regexp::MULTILINE if val['mods'].include?( 'm' ) - mods |= 32 if val['mods'].include?( 'n' ) + mods |= Regexp::NOENCODING if val['mods'].include?( 'n' ) end val.delete( 'mods' ) r = YAML::object_maker( klass, {} ) |