зеркало из https://github.com/github/ruby.git
* 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:
Родитель
89ef6628eb
Коммит
b93c74c6e8
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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, {} )
|
||||
|
|
Загрузка…
Ссылка в новой задаче