summaryrefslogtreecommitdiff
path: root/ext/json/lib
diff options
context:
space:
mode:
authorSho Hashimoto <sho.hsmt@gmail.com>2019-01-15 22:16:05 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-10-14 19:54:48 +0900
commitd9e50fcbeb34534d065f3662b6b952bc57994b43 (patch)
tree67ed75f0622171ef281892f90d48bad0b33596ca /ext/json/lib
parent7376d70cb0817158a9ce0ef433872be5ca7af56b (diff)
[flori/json] Pass args all #to_json in json/add/*.
https://github.com/flori/json/commit/36a7ef6790
Diffstat (limited to 'ext/json/lib')
-rw-r--r--ext/json/lib/json/add/bigdecimal.rb4
-rw-r--r--ext/json/lib/json/add/complex.rb4
-rw-r--r--ext/json/lib/json/add/rational.rb4
-rw-r--r--ext/json/lib/json/add/regexp.rb4
4 files changed, 8 insertions, 8 deletions
diff --git a/ext/json/lib/json/add/bigdecimal.rb b/ext/json/lib/json/add/bigdecimal.rb
index 539daeeaf53..c8b4f567cb6 100644
--- a/ext/json/lib/json/add/bigdecimal.rb
+++ b/ext/json/lib/json/add/bigdecimal.rb
@@ -23,7 +23,7 @@ class BigDecimal
end
# return the JSON value
- def to_json(*)
- as_json.to_json
+ def to_json(*args)
+ as_json.to_json(*args)
end
end
diff --git a/ext/json/lib/json/add/complex.rb b/ext/json/lib/json/add/complex.rb
index 28ef734daf2..4d977e75898 100644
--- a/ext/json/lib/json/add/complex.rb
+++ b/ext/json/lib/json/add/complex.rb
@@ -23,7 +23,7 @@ class Complex
end
# Stores class name (Complex) along with real value <tt>r</tt> and imaginary value <tt>i</tt> as JSON string
- def to_json(*)
- as_json.to_json
+ def to_json(*args)
+ as_json.to_json(*args)
end
end
diff --git a/ext/json/lib/json/add/rational.rb b/ext/json/lib/json/add/rational.rb
index 356940b2252..6be40345814 100644
--- a/ext/json/lib/json/add/rational.rb
+++ b/ext/json/lib/json/add/rational.rb
@@ -22,7 +22,7 @@ class Rational
end
# Stores class name (Rational) along with numerator value <tt>n</tt> and denominator value <tt>d</tt> as JSON string
- def to_json(*)
- as_json.to_json
+ def to_json(*args)
+ as_json.to_json(*args)
end
end
diff --git a/ext/json/lib/json/add/regexp.rb b/ext/json/lib/json/add/regexp.rb
index a93866b05ad..39d69fede7b 100644
--- a/ext/json/lib/json/add/regexp.rb
+++ b/ext/json/lib/json/add/regexp.rb
@@ -24,7 +24,7 @@ class Regexp
# Stores class name (Regexp) with options <tt>o</tt> and source <tt>s</tt>
# (Regexp or String) as JSON string
- def to_json(*)
- as_json.to_json
+ def to_json(*args)
+ as_json.to_json(*args)
end
end