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

ruby-changes:16850

From: nobu <ko1@a...>
Date: Tue, 3 Aug 2010 21:03:32 +0900 (JST)
Subject: [ruby-changes:16850] Ruby:r28845 (trunk): * hash.c (rb_check_hash_type): added.

nobu	2010-08-03 21:01:13 +0900 (Tue, 03 Aug 2010)

  New Revision: 28845

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

  Log:
    * hash.c (rb_check_hash_type): added.

  Modified files:
    trunk/ChangeLog
    trunk/hash.c
    trunk/include/ruby/intern.h

Index: include/ruby/intern.h
===================================================================
--- include/ruby/intern.h	(revision 28844)
+++ include/ruby/intern.h	(revision 28845)
@@ -406,6 +406,7 @@
 #define Init_stack(addr) ruby_init_stack(addr)
 /* hash.c */
 void st_foreach_safe(struct st_table *, int (*)(ANYARGS), st_data_t);
+VALUE rb_check_hash_type(VALUE);
 void rb_hash_foreach(VALUE, int (*)(ANYARGS), VALUE);
 VALUE rb_hash(VALUE);
 VALUE rb_hash_new(void);
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 28844)
+++ ChangeLog	(revision 28845)
@@ -1,3 +1,7 @@
+Tue Aug  3 21:01:10 2010  Nobuyoshi Nakada  <nobu@r...>
+
+	* hash.c (rb_check_hash_type): added.
+
 Tue Aug  3 20:30:16 2010  Nobuyoshi Nakada  <nobu@r...>
 
 	* bignum.c (rb_big_eq): never equal to infinity.
Index: hash.c
===================================================================
--- hash.c	(revision 28844)
+++ hash.c	(revision 28845)
@@ -418,6 +418,12 @@
     return rb_convert_type(hash, T_HASH, "Hash", "to_hash");
 }
 
+VALUE
+rb_check_hash_type(VALUE hash)
+{
+    return rb_check_convert_type(hash, T_HASH, "Hash", "to_hash");
+}
+
 /*
  *  call-seq:
  *     Hash.try_convert(obj) -> hash or nil
@@ -432,7 +438,7 @@
 static VALUE
 rb_hash_s_try_convert(VALUE dummy, VALUE hash)
 {
-    return rb_check_convert_type(hash, T_HASH, "Hash", "to_hash");
+    return rb_check_hash_type(hash);
 }
 
 static int

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

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