diff --git a/lib/hpricot/parse.rb b/lib/hpricot/parse.rb index 7bb85d2..dbda0da 100644 --- a/lib/hpricot/parse.rb +++ b/lib/hpricot/parse.rb @@ -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