FIX: made SMF2 importer compatible with Ruby 2.0
This commit is contained in:
parent
91cbdb565d
commit
b74a7d271a
|
@ -445,7 +445,8 @@ class ImportScripts::Smf2 < ImportScripts::Base
|
|||
# param1=value1=still1 value1 param2=value2 ...
|
||||
# => {'param1' => 'value1=still1 value1', 'param2' => 'value2 ...'}
|
||||
def parse_tag_params(params)
|
||||
params.to_s.strip.scan(/(?<param>\w+)=(?<value>(?:(?>\S+)|\s+(?!\w+=))*)/).to_h
|
||||
params.to_s.strip.scan(/(?<param>\w+)=(?<value>(?:(?>\S+)|\s+(?!\w+=))*)/).
|
||||
inject({}) {|h,e| h[e[0]] = e[1]; h }
|
||||
end
|
||||
|
||||
class << self
|
||||
|
|
Loading…
Reference in New Issue