summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-06 12:38:53 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-06 12:38:53 +0000
commitb4e9b0d19c220965b5e3799771f31660b1262548 (patch)
tree7c9b0dc592f91608e40b9a709c1c53c82db5852b
parente667aaf4ca63c6360d778eb8101fe81f73184cff (diff)
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
-rw-r--r--ext/json/lib/json/add/range.rb2
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 e61e553..d2a5b33 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