jnunemaker / crack

Really simple JSON and XML parsing, ripped from Merb and Rails.
MIT License
541 stars 93 forks source link

many json tests are failing with ruby 1.9 #44

Closed pravi closed 9 months ago

pravi commented 11 years ago

$ ruby1.9.1 --version ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]

Full log here http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=623900#64

pravi commented 11 years ago

duplicate of #26 , still it would be nice if it was fixed in crack itself

+--- a/test/json_test.rb
++++ b/test/json_test.rb
+@@ -1,6 +1,10 @@
+ # coding: utf-8
+ require 'test_helper'
+ 
++if RUBY_VERSION =~ /1\.9/
++  YAML::ENGINE.yamler = "syck"
++end
++
+ class JsonTest < Test::Unit::TestCase  
+   TESTS = {
+     %q({"data": "G\u00fcnter"})                   => {"data" => "Günter"},
kiskoza commented 9 months ago

Ruby 1.9 is already EOL, the CI is passing for Ruby 2.0+. Feel free to reopen the issue if you still need something to be fixed