[前][次][番号順一覧][スレッド一覧]

ruby-changes:64456

From: Hiroshi <ko1@a...>
Date: Tue, 22 Dec 2020 19:44:51 +0900 (JST)
Subject: [ruby-changes:64456] edb76e8765 (master): Prepare to release json-2.5.0

https://git.ruby-lang.org/ruby.git/commit/?id=edb76e8765

From edb76e8765b7f165237c8ca6155cff1cc0f18cf9 Mon Sep 17 00:00:00 2001
From: Hiroshi SHIBATA <hsbt@r...>
Date: Tue, 22 Dec 2020 18:18:32 +0900
Subject: Prepare to release json-2.5.0


diff --git a/ext/json/VERSION b/ext/json/VERSION
index 005119b..437459c 100644
--- a/ext/json/VERSION
+++ b/ext/json/VERSION
@@ -1 +1 @@
-2.4.1
+2.5.0
diff --git a/ext/json/lib/json/common.rb b/ext/json/lib/json/common.rb
index d58c7ea..3e390f2 100644
--- a/ext/json/lib/json/common.rb
+++ b/ext/json/lib/json/common.rb
@@ -71,6 +71,7 @@ module JSON https://github.com/ruby/ruby/blob/trunk/ext/json/lib/json/common.rb#L71
       end
       self.state = generator::State
       const_set :State, self.state
+      const_set :SAFE_STATE_PROTOTYPE, State.new # for JRuby
     ensure
       $VERBOSE = old
     end
diff --git a/ext/json/lib/json/version.rb b/ext/json/lib/json/version.rb
index 5502a4d..2a0a6e8 100644
--- a/ext/json/lib/json/version.rb
+++ b/ext/json/lib/json/version.rb
@@ -1,7 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ext/json/lib/json/version.rb#L1
 # frozen_string_literal: false
 module JSON
   # JSON version
-  VERSION         = '2.4.1'
+  VERSION         = '2.5.0'
   VERSION_ARRAY   = VERSION.split(/\./).map { |x| x.to_i } # :nodoc:
   VERSION_MAJOR   = VERSION_ARRAY[0] # :nodoc:
   VERSION_MINOR   = VERSION_ARRAY[1] # :nodoc:
diff --git a/test/json/json_generator_test.rb b/test/json/json_generator_test.rb
index 5bafc3e..f31b6b2 100644
--- a/test/json/json_generator_test.rb
+++ b/test/json/json_generator_test.rb
@@ -232,7 +232,7 @@ EOT https://github.com/ruby/ruby/blob/trunk/test/json/json_generator_test.rb#L232
   end
 
   def test_gc
-    if respond_to?(:assert_in_out_err)
+    if respond_to?(:assert_in_out_err) && !(RUBY_PLATFORM =~ /java/)
       assert_in_out_err(%w[-rjson --disable-gems], <<-EOS, [], [])
         bignum_too_long_to_embed_as_string = 1234567890123456789012345
         expect = bignum_too_long_to_embed_as_string.to_s
diff --git a/test/json/ractor_test.rb b/test/json/ractor_test.rb
index 96d1528..71105e5 100644
--- a/test/json/ractor_test.rb
+++ b/test/json/ractor_test.rb
@@ -4,10 +4,6 @@ https://github.com/ruby/ruby/blob/trunk/test/json/ractor_test.rb#L4
 require 'test_helper'
 
 class JSONInRactorTest < Test::Unit::TestCase
-  def setup
-    skip unless defined? Ractor
-  end
-
   def test_generate
     assert_separately([], "#{<<~"begin;"}\n#{<<~'end;'}")
     begin;
@@ -31,4 +27,4 @@ class JSONInRactorTest < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/json/ractor_test.rb#L27
       assert_equal(JSON.parse(expected_json), r.take)
     end;
   end
-end
+end if defined?(Ractor)
diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb
index e7a9a9c..6202150 100644
--- a/tool/sync_default_gems.rb
+++ b/tool/sync_default_gems.rb
@@ -119,6 +119,7 @@ def sync_default_gems(gem) https://github.com/ruby/ruby/blob/trunk/tool/sync_default_gems.rb#L119
     rm_rf(%w[ext/json test/json])
     cp_r("#{upstream}/ext/json/ext", "ext/json")
     cp_r("#{upstream}/tests", "test/json")
+    rm_rf("test/json/lib")
     cp_r("#{upstream}/lib", "ext/json")
     cp_r("#{upstream}/json.gemspec", "ext/json")
     cp_r("#{upstream}/VERSION", "ext/json")
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]