Created
September 25, 2008 14:47
-
-
Save mchung/12831 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# libxml-ruby segfault | |
require 'rubygems' | |
require 'xml' | |
def try(&block) | |
begin | |
yield if block_given? | |
rescue | |
puts "err: #{$!}" | |
end | |
end | |
f= XML::Parser.new | |
f.string = "<xml>foo</xml>" | |
try do | |
f.parse | |
end | |
try do | |
f.parse | |
end | |
try do | |
f.parse | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment