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

ruby-changes:44053

From: nobu <ko1@a...>
Date: Fri, 9 Sep 2016 18:27:51 +0900 (JST)
Subject: [ruby-changes:44053] nobu:r56126 (trunk): json_generator_test.rb: no Bignum

nobu	2016-09-09 18:27:38 +0900 (Fri, 09 Sep 2016)

  New Revision: 56126

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56126

  Log:
    json_generator_test.rb: no Bignum
    
    * test/json/json_generator_test.rb (test_broken_bignum): get rid
      of use of Bignum, obsolete name.

  Modified files:
    trunk/test/json/json_generator_test.rb
Index: test/json/json_generator_test.rb
===================================================================
--- test/json/json_generator_test.rb	(revision 56125)
+++ test/json/json_generator_test.rb	(revision 56126)
@@ -277,12 +277,13 @@ EOT https://github.com/ruby/ruby/blob/trunk/test/json/json_generator_test.rb#L277
   if defined?(JSON::Ext::Generator)
     def test_broken_bignum # [ruby-core:38867]
       pid = fork do
-        Bignum.class_eval do
+        x = 1 << 64
+        x.class.class_eval do
           def to_s
           end
         end
         begin
-          JSON::Ext::Generator::State.new.generate(1<<64)
+          JSON::Ext::Generator::State.new.generate(x)
           exit 1
         rescue TypeError
           exit 0

Property changes on: test/json/json_generator_test.rb
___________________________________________________________________
Added: svn:executable
   + *


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

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