зеркало из https://github.com/github/ruby.git
[flori/json] Pass args all #to_json in json/add/*.
https://github.com/flori/json/commit/36a7ef6790
This commit is contained in:
Родитель
7376d70cb0
Коммит
d9e50fcbeb
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче