summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSho Hashimoto <sho.hsmt@gmail.com>2019-01-15 22:16:05 +0900
committerFlorian Frank <flori@ping.de>2019-04-29 16:25:33 +0200
commit36a7ef6790881afc813e5d025efddb7ee95d3db4 (patch)
treedf056eae8dd6a4c86efd3cd6f9c8a8bee004bafa
parent09aa02ede8d7e70a113bfa87be5ed34676d57206 (diff)
downloadjson-36a7ef6790881afc813e5d025efddb7ee95d3db4.tar.gz
Pass args all #to_json in json/add/*.
-rw-r--r--lib/json/add/bigdecimal.rb4
-rw-r--r--lib/json/add/complex.rb4
-rw-r--r--lib/json/add/rational.rb4
-rw-r--r--lib/json/add/regexp.rb4
4 files changed, 8 insertions, 8 deletions
diff --git a/lib/json/add/bigdecimal.rb b/lib/json/add/bigdecimal.rb
index 539daee..c8b4f56 100644
--- a/lib/json/add/bigdecimal.rb
+++ b/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/lib/json/add/complex.rb b/lib/json/add/complex.rb
index 28ef734..4d977e7 100644
--- a/lib/json/add/complex.rb
+++ b/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/lib/json/add/rational.rb b/lib/json/add/rational.rb
index 356940b..6be4034 100644
--- a/lib/json/add/rational.rb
+++ b/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/lib/json/add/regexp.rb b/lib/json/add/regexp.rb
index a93866b..39d69fe 100644
--- a/lib/json/add/regexp.rb
+++ b/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