1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

json/add/range.rb: use Range#end

* ext/json/lib/json/add/range.rb (Range#as_json): use Range#end
  instead of Range#last which can be affected by Range#exclusive?.
  ref [Bug #8739]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2013-08-06 12:38:53 +00:00
parent e667aaf4ca
commit b4e9b0d19c

View file

@ -16,7 +16,7 @@ class Range
def as_json(*)
{
JSON.create_id => self.class.name,
'a' => [ first, last, exclude_end? ]
'a' => [ first, self.end, exclude_end? ]
}
end