Merge pull request #4572 from semaperepelitsa/noregexp
Replace regexp matching with a simple string manipulation.
This commit is contained in:
commit
c05f3b0e4f
@ -30,8 +30,9 @@ def [](key)
|
||||
end
|
||||
|
||||
def method_missing(name, *args)
|
||||
if name.to_s =~ /(.*)=$/
|
||||
self[$1] = args.first
|
||||
name_string = name.to_s
|
||||
if name_string.chomp!('=')
|
||||
self[name_string] = args.first
|
||||
else
|
||||
self[name]
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user