diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-08-06 12:38:53 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-08-06 12:38:53 +0000 |
commit | b4e9b0d19c220965b5e3799771f31660b1262548 (patch) | |
tree | 7c9b0dc592f91608e40b9a709c1c53c82db5852b /ext/json | |
parent | e667aaf4ca63c6360d778eb8101fe81f73184cff (diff) | |
download | ruby-b4e9b0d19c220965b5e3799771f31660b1262548.tar.gz |
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
Diffstat (limited to 'ext/json')
-rw-r--r-- | ext/json/lib/json/add/range.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/json/lib/json/add/range.rb b/ext/json/lib/json/add/range.rb index e61e553cdb..d2a5b335e0 100644 --- a/ext/json/lib/json/add/range.rb +++ b/ext/json/lib/json/add/range.rb @@ -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 |