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
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