Segmentation fault on Windows

J

Jyo Ni

Hi,

When I try to run the following program I get a segmentation fault:
require 'rubygems'
require 'json'
require 'net/http'
def testrsv()
base_url =
"http://10.221.112.10:8080/reserve-online/reservations?status=emailed&format=json"
url = "#{base_url}"
resp = Net::HTTP.get_response(URI.parse(base_url))
data = resp.body
# data structure - a hash
result = JSON.parse(data)
# if the hash has 'Error' as a key, we raise an error
result['reservations']['reservation'].each { |result|
print "#{result['ean']} => #{result['status']}\n"
}

end

C:/Users/SudJyo/AppData/Local/Temp/rb276D.tmp:21: [BUG] Segmentation
fault
ruby 1.8.6 (2007-09-24) [i386-mswin32]

This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application's support team for more information.


Can anyone help me finding the cause of this issue?
Thanks,
Jyo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top