summaryrefslogtreecommitdiff
path: root/libre/ruby/json-2.0.2-ruby-2.4.1-backports.patch
blob: 4791731fb11fa59e2e7395fdb67f1463e7ff3c31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
This is the complete set of patches applied to json-2.0.2 for the ruby
2.4.1 distribution (excluding build system changes).

 -- Luke Shumaker
    Parabola GNU/Linux-libre

commit 1ffad9c1a7bafb59453acf0779231e241458260b
Author: nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
Date:   Fri Sep 9 09:27:38 2016 +0000

    json_generator_test.rb: no Bignum
    
    * test/json/json_generator_test.rb (test_broken_bignum): get rid
      of use of Bignum, obsolete name.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
    (cherry picked from commit 7f6410f02d3092075b9990705d0151ffb44f51a1)

diff --git a/tests/json_generator_test.rb b/tests/json_generator_test.rb
index 18b08337f8..86be398f46 100644
--- a/tests/json_generator_test.rb
+++ b/tests/json_generator_test.rb
@@ -277,12 +277,13 @@ EOT
   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

commit 9f4a32dbd50df3bb066be4028a3b1bb9845c76cd
Author: nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
Date:   Tue Aug 30 06:27:29 2016 +0000

    Fix rdoc of OpenStruct.json_create [ci skip]
    
    * ext/json/lib/json/add/ostruct.rb (OpenStruct.json_create):
      Correct documentation, fix the name of values.  [Fix GH-1421]
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
    (cherry picked from commit c2d77880c070fa94e6fe1e31e477225c13318933)

diff --git a/lib/json/add/ostruct.rb b/lib/json/add/ostruct.rb
index 7c13910052..e064c85ff4 100644
--- a/lib/json/add/ostruct.rb
+++ b/lib/json/add/ostruct.rb
@@ -7,7 +7,7 @@ require 'ostruct'
 class OpenStruct
 
   # Deserializes JSON string by constructing new Struct object with values
-  # <tt>v</tt> serialized by <tt>to_json</tt>.
+  # <tt>t</tt> serialized by <tt>to_json</tt>.
   def self.json_create(object)
     new(object['t'] || object[:t])
   end