[#24105] [Bug #1711] Marshal Failing to Round-Trip Certain Recurisve Data Structures — Run Paint Run Run <redmine@...>

Bug #1711: Marshal Failing to Round-Trip Certain Recurisve Data Structures

9 messages 2009/07/01

[#24116] [Bug #1715] Numeric#arg for NaN is Inconsistent Across Versions — Run Paint Run Run <redmine@...>

Bug #1715: Numeric#arg for NaN is Inconsistent Across Versions

10 messages 2009/07/02

[#24240] [Bug #1755] IO#reopen Doesn't Fully Associate with Given Stream on 1.9; Ignores pos on 1.8 — Run Paint Run Run <redmine@...>

Bug #1755: IO#reopen Doesn't Fully Associate with Given Stream on 1.9; Ignores pos on 1.8

8 messages 2009/07/09

[#24321] [Bug #1773] Gem path doesn't honor user gem? — Lin Jen-Shin <redmine@...>

Bug #1773: Gem path doesn't honor user gem?

12 messages 2009/07/14

[#24390] [Feature #1784] More encoding (Big5 series) support? — Lin Jen-Shin <redmine@...>

Feature #1784: More encoding (Big5 series) support?

12 messages 2009/07/16

[#24467] Re: [ruby-cvs:31226] Ruby:r24008 (ruby_1_8_6): Removed private on to_date and to_datetime. — Urabe Shyouhei <shyouhei@...>

Hello.

10 messages 2009/07/21

[#24472] [Feature #1800] rubygems can replace system executable files — Kazuhiro NISHIYAMA <redmine@...>

Feature #1800: rubygems can replace system executable files

13 messages 2009/07/21

[#24530] [Feature #1811] Default BasicSocket.do_not_reverse_lookup to true — Roger Pack <redmine@...>

Feature #1811: Default BasicSocket.do_not_reverse_lookup to true

9 messages 2009/07/23

[#24624] [Bug #1844] Immediates Should Not Respond to :dup — Run Paint Run Run <redmine@...>

Bug #1844: Immediates Should Not Respond to :dup

15 messages 2009/07/30

[ruby-core:24505] [Bug #1757] cygwin-1.7, gcc4-4.3, and ruby-1.9. method `inspect' called on hidden object (0x10046720) (NotImplementedError)

From: neomjp neomjp <redmine@...>
Date: 2009-07-22 14:42:40 UTC
List: ruby-core #24505
Issue #1757 has been updated by neomjp neomjp.


I was wrong in presuming that -DCCP_WIN_A_TO_POSIX=CCP_WIN_A_TO_POSIX was not related. 

1. ../ruby-1.9.2-r24220/configure --program-suffix="-19" --with-ridir="/usr/share/ri-19" CC="gcc-4"
2. Edit Makefile so that
     CFLAGS = ${cflags} -DCCP_WIN_A_TO_POSIX=CCP_WIN_A_TO_POSIX
3. make

$ ./miniruby.exe -ve "p($:)"; 
ruby 1.9.2dev (2009-07-21 trunk 24220) [i386-cygwin]
-e:1:in `inspect': method `inspect' called on hidden object (0x10046658) (NotImplementedError)
        from -e:1:in `p'
        from -e:1:in `<main>'

Something about #define BASEPATH() in r23468 seemed to be related to this issue. The correct behavior could be recovered by using rb_str_buf_cat() instead of rb_str_dup() in case #if !VARIABLE_LIBPATH is false. But I am not sure if it is the right way to fix it. Can anybody verify this?

--- src/ruby-1.9.2-r24220/ruby.c	2009-06-23 01:21:09.000000000 +0900
+++ newsrc/ruby-1.9.2-r24220/ruby.c	2009-07-22 22:00:18.282555100 +0900
@@ -350,8 +363,8 @@ ruby_init_loadpath_safe(int safe_level)
     VALUE sopath;
 # else
     char libpath[MAXPATHLEN + 1];
-    size_t baselen;
 # endif
+    size_t baselen;
     char *p;
 
 #if defined _WIN32 || defined __CYGWIN__
@@ -414,15 +427,13 @@ ruby_init_loadpath_safe(int safe_level)
 	p = libpath + 1;
     }
 
-    baselen = p - libpath;
-
-#define BASEPATH() rb_str_buf_cat(rb_str_buf_new(baselen+len), libpath, baselen)
 #else
     rb_str_set_len(sopath, p - libpath);
 
-#define BASEPATH() rb_str_dup(sopath)
 #endif
+    baselen = p - libpath;
+#define BASEPATH() rb_str_buf_cat(rb_str_buf_new(baselen+len), libpath, baselen)
 
 #define RUBY_RELATIVE(path, len) rb_str_buf_cat(BASEPATH(), path, len)
 #else
 #define RUBY_RELATIVE(path, len) rubylib_mangled_path(path, len)

$ ./miniruby.exe -ve "p($:)";
ruby 1.9.2dev (2009-07-21 trunk 24220) [i386-cygwin]
["/tmp/ruby19/ruby19-1.9.2devr24220-0/build/lib/ruby/site_ruby/1.9.1", "/tmp/ruby19/ruby19-1.9.2devr24220-0/build/lib/ruby/site_ruby/1.9.1/i386-cygwin", "/tmp/ruby19/ruby19-1.9.2devr24220-0/build/lib/ruby/site_ruby", "/tmp/ruby19/ruby19-1.9.2devr24220-0/build/lib/ruby/vendor_ruby/1.9.1", "/tmp/ruby19/ruby19-1.9.2devr24220-0/build/lib/ruby/vendor_ruby/1.9.1/i386-cygwin", "/tmp/ruby19/ruby19-1.9.2devr24220-0/build/lib/ruby/vendor_ruby", "/tmp/ruby19/ruby19-1.9.2devr24220-0/build/lib/ruby/1.9.1", "/tmp/ruby19/ruby19-1.9.2devr24220-0/build/lib/ruby/1.9.1/i386-cygwin"]

----------------------------------------
http://redmine.ruby-lang.org/issues/show/1757

----------------------------------------
http://redmine.ruby-lang.org

In This Thread