[ruby-cvs:52103] akr:r44958 (trunk): * enum.c: Enumerable#{min, min_by, max, max_by} extended to take an

akr at ruby-lang.org akr at ruby-lang.org
Sat Feb 15 00:45:12 JST 2014


akr	2014-02-15 00:45:11 +0900 (Sat, 15 Feb 2014)

  New Revision: 44958

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

  Log:
    * enum.c: Enumerable#{min,min_by,max,max_by} extended to take an
      optional argument.
      (nmin_cmp): New function.
      (nmin_block_cmp): Ditto
      (nmin_filter): Ditto.
      (nmin_i): Ditto.
      (nmin_run): Ditto.
      (enum_min): Call nmin_run if the optional argument is given.
      (nmin_max): Ditto.
      (nmin_min_by): Ditto.
      (nmin_max_by): Ditto.
    
    * range.c: Range#{min,max} extended to take an optional argument.
      (range_min): Call range_first if the optional argument is given.
      (range_max): Call rb_call_super if the optional argument is given.
    
    [ruby-core:57111] [Feature #8887]

  Modified files:
    trunk/ChangeLog
    trunk/NEWS
    trunk/enum.c
    trunk/range.c
    trunk/test/ruby/test_enum.rb
    trunk/test/ruby/test_range.rb


More information about the ruby-cvs mailing list