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

ruby-changes:44975

From: naruse <ko1@a...>
Date: Sun, 11 Dec 2016 03:34:14 +0900 (JST)
Subject: [ruby-changes:44975] naruse:r57048 (trunk): Updated documentation examples for Hash#value?

naruse	2016-12-11 03:34:07 +0900 (Sun, 11 Dec 2016)

  New Revision: 57048

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57048

  Log:
    Updated documentation examples for Hash#value?
    
    The same code is used for has_value? and value?, but according to
    http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/43765
    has_value is deprecated. Use the non-deprecated syntax in the examples.
    by Herwin Weststrate <herwin@s...>
    fix https://github.com/ruby/ruby/pull/1491

  Modified files:
    trunk/hash.c
Index: hash.c
===================================================================
--- hash.c	(revision 57047)
+++ hash.c	(revision 57048)
@@ -2133,8 +2133,8 @@ rb_hash_search_value(VALUE key, VALUE va https://github.com/ruby/ruby/blob/trunk/hash.c#L2133
  *  in <i>hsh</i>.
  *
  *     h = { "a" => 100, "b" => 200 }
- *     h.has_value?(100)   #=> true
- *     h.has_value?(999)   #=> false
+ *     h.value?(100)   #=> true
+ *     h.value?(999)   #=> false
  */
 
 static VALUE

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

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