Skip to content

Commit

Permalink
Pass args all #to_json in json/add/*.
Browse files Browse the repository at this point in the history
  • Loading branch information
sho-h authored and flori committed Apr 29, 2019
1 parent 09aa02e commit 36a7ef6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions lib/json/add/bigdecimal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def as_json(*)
end

# return the JSON value
def to_json(*)
as_json.to_json
def to_json(*args)
as_json.to_json(*args)
end
end
4 changes: 2 additions & 2 deletions lib/json/add/complex.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def as_json(*)
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
4 changes: 2 additions & 2 deletions lib/json/add/rational.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def as_json(*)
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
4 changes: 2 additions & 2 deletions lib/json/add/regexp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def as_json(*)

# 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

0 comments on commit 36a7ef6

Please sign in to comment.