1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/psych/lib/psych/visitors/to_ruby.rb: use Regexp::NOENCODING

rather than magic number.
* ext/syck/lib/syck/rubytypes.rb: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
tenderlove 2011-02-02 22:22:26 +00:00
parent 89ef6628eb
commit b93c74c6e8
3 changed files with 9 additions and 4 deletions

View file

@ -1,3 +1,10 @@
Thu Feb 3 07:20:46 2011 Aaron Patterson <aaron@tenderlovemaking.com>
* ext/psych/lib/psych/visitors/to_ruby.rb: use Regexp::NOENCODING
rather than magic number.
* ext/syck/lib/syck/rubytypes.rb: ditto
Thu Feb 3 07:16:11 2011 Aaron Patterson <aaron@tenderlovemaking.com>
* re.c (Init_Regexp): added a constant for ARG_ENCODING_NONE

View file

@ -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

View file

@ -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, {} )