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

ruby-changes:42513

From: nobu <ko1@a...>
Date: Fri, 15 Apr 2016 08:13:42 +0900 (JST)
Subject: [ruby-changes:42513] nobu:r54587 (trunk): io/console: rb_sym2str

nobu	2016-04-15 09:02:59 +0900 (Fri, 15 Apr 2016)

  New Revision: 54587

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

  Log:
    io/console: rb_sym2str
    
    * ext/io/console/console.c (rb_sym2str): fallback definition for
      older ruby.  [ruby-core:74953] [Bug #12284]

  Modified files:
    trunk/ChangeLog
    trunk/ext/io/console/console.c
    trunk/ext/io/console/extconf.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 54586)
+++ ChangeLog	(revision 54587)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Apr 15 09:02:58 2016  Nobuyoshi Nakada  <nobu@r...>
+
+	* ext/io/console/console.c (rb_sym2str): fallback definition for
+	  older ruby.  [ruby-core:74953] [Bug #12284]
+
 Thu Apr 14 21:46:36 2016  Tanaka Akira  <akr@f...>
 
 	* array.c (rb_ary_sum): Support the optional argument, init, and
Index: ext/io/console/console.c
===================================================================
--- ext/io/console/console.c	(revision 54586)
+++ ext/io/console/console.c	(revision 54587)
@@ -103,6 +103,10 @@ rb_f_send(int argc, VALUE *argv, VALUE r https://github.com/ruby/ruby/blob/trunk/ext/io/console/console.c#L103
 }
 #endif
 
+#ifndef HAVE_RB_SYM2STR
+# define rb_sym2str(sym) rb_id2str(SYM2ID(sym))
+#endif
+
 typedef struct {
     int vmin;
     int vtime;
Index: ext/io/console/extconf.rb
===================================================================
--- ext/io/console/extconf.rb	(revision 54586)
+++ ext/io/console/extconf.rb	(revision 54587)
@@ -18,6 +18,7 @@ end https://github.com/ruby/ruby/blob/trunk/ext/io/console/extconf.rb#L18
 if ok
   have_header("sys/ioctl.h") if hdr
   have_func("rb_funcallv")
+  have_func("rb_sym2str")
   # rb_check_hash_type: 1.9.3
   # rb_io_get_write_io: 1.9.1
   # rb_cloexec_open: 2.0.0

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

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