[前][次][番号順一覧][スレッド一覧]

ruby-changes:30347

From: nobu <ko1@a...>
Date: Tue, 6 Aug 2013 21:39:11 +0900 (JST)
Subject: [ruby-changes:30347] nobu:r42404 (trunk): json/add/range.rb: use Range#end

nobu	2013-08-06 21:38:53 +0900 (Tue, 06 Aug 2013)

  New Revision: 42404

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42404

  Log:
    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]

  Modified files:
    trunk/ext/json/lib/json/add/range.rb
_______________________________________________
ruby-cvs mailing list
ruby-cvs@r...
http://lists.ruby-lang.org/cgi-bin/mailman/listinfo/ruby-cvs
Index: ext/json/lib/json/add/range.rb
===================================================================
--- ext/json/lib/json/add/range.rb	(revision 42403)
+++ ext/json/lib/json/add/range.rb	(revision 42404)
@@ -16,7 +16,7 @@ class Range https://github.com/ruby/ruby/blob/trunk/ext/json/lib/json/add/range.rb#L16
   def as_json(*)
     {
       JSON.create_id  => self.class.name,
-      'a'             => [ first, last, exclude_end? ]
+      'a'             => [ first, self.end, exclude_end? ]
     }
   end
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]