Skip to content

Commit

Permalink
Applied a workaround to parse.rb to overcome the bug #22518 of IronRu…
Browse files Browse the repository at this point in the history
…by on unsplat. This workaround will be removed when the above mentioned bug will be fixed.
  • Loading branch information
nrk committed Feb 13, 2009
1 parent 402b50b commit d28d39f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/hpricot/parse.rb
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,13 @@ def DocType.parse(root_element_name, attrs, raw_string)
result
end

def ProcIns.parse(raw_string)
_, target, content = *raw_string.match(/\A<\?(\S+)\s+(.+)/m)
def ProcIns.parse(raw_string)
# _, target, content = *raw_string.match(/\A<\?(\S+)\s+(.+)/m)

# TODO: temporary workaround, needed until the bug #22518 (http://is.gd/jhaf) is fixed in IronRuby
matchData = raw_string.match(/\A<\?(\S+)\s+(.+)/m)
_, target, content = matchData.to_a

result = ProcIns.new(target, content)
result
end
Expand Down

0 comments on commit d28d39f

Please sign in to comment.