Skip to content

Commit

Permalink
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kernel/common/regexp.rb
Original file line number Diff line number Diff line change
@@ -128,6 +128,8 @@ def initialize(pattern, opts=nil, lang=nil)
if pattern.kind_of?(Regexp)
opts = pattern.options
pattern = pattern.source
elsif pattern.kind_of?(Fixnum) or pattern.kind_of?(Float)
raise TypeError, "can't convert Fixnum into String"
elsif opts.kind_of?(Fixnum)
opts = opts & (OPTION_MASK | KCODE_MASK) if opts > 0
elsif opts

0 comments on commit a60dfb3

Please sign in to comment.