Forum: Ruby-dev Ruby 1.8.6 preview2 has been released

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Akinori MUSHA (Guest)
on 2007-02-24 17:29
(Received via mailing list)
 Ruby 1.8.6 preview2 をリリースしました。

 1.8.5リリース以降見つかった数多くのバグの修正とライブラリの更新、
一部のパフォーマンスの改善を含みます。

 ソースファイルは以下のURLで取得できます。

  ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-preview2.tar.gz

チェックサム:
  MD5 (ruby-1.8.6-preview2.tar.gz) = 64504fe5807b9e1779a8a322bba49f63
  SHA1 (ruby-1.8.6-preview2.tar.gz) =
177615211c3b4e44b49f0bd257aae740113bfcbb
  SHA256 (ruby-1.8.6-preview2.tar.gz) =
62d5c55c0cc157a08bfd3cd94037a44f6e8b689d4386cfdaaa1a68789ef2e136
  SHA384 (ruby-1.8.6-preview2.tar.gz) =
a72c127976361389f35c45d02db166a08664198255a39e621f084dadbc8968ff28b787d0c7717d2e2fffb5e4fef26f33
  SHA512 (ruby-1.8.6-preview2.tar.gz) =
22bf52382a88d6388973a45abb7d1d9a9073989506f1274da1963b9bf9da0e135cacd1743d685afa764b928a57de8f12a19aed9c520a7dbd0d58e4d4c56a7c3c
  RMD160 (ruby-1.8.6-preview2.tar.gz) =
51f7be3198798c8675637fb8a24f4ed8502fffc4
  Tiger (ruby-1.8.6-preview2.tar.gz) =
c01ad7e5112677720ce40c78db59b56bf82e75aad047d7e2
  Whirlpool (ruby-1.8.6-preview2.tar.gz) =
5f9660b95c3c3d7692807b9058f67b47e36b20e1021edc2fc09e9ec541cc7c1abd3f2104fa66048534aafd0759327208681296702afe84dc6814b7467561762c
  SIZE (ruby/ruby-1.8.6-preview2.tar.gz) = 4535884


 テストしてみて問題を発見されたら、お早めにご報告ください。

 最終リリースは一週間後を予定しています。

 よろしくお願いします。

--
                     /
                    /__  __            Akinori.org / MUSHA.org
                   / )  )  ) )  /     FreeBSD.org / Ruby-lang.org
Akinori MUSHA aka / (_ /  ( (__(  @ iDaemons.org / and.or.jp

"Different eyes see different things,
    Different hearts beat on different strings --
       But there are times for you and me when all such things agree"
$B$H$_$?$^$5$R$m(B (Guest)
on 2007-02-25 04:08
(Received via mailing list)
$B$H$_$?$G$9!#(B

On Sun, 25 Feb 2007 00:28:34 +0900
"Akinori MUSHA" <removed_email_address@domain.invalid> wrote:

> $B!!(BRuby 1.8.6 preview2 $B$r%j%j!<%9$7$^$7$?!#(B
         $B!A!A(B
> $B!!%F%9%H$7$F$_$FLdBj$rH/8+$5$l$?$i!"$*Aa$a$K$4Js9p$/$@$5$$!#(B

[ruby-dev:30400] $B$r$*4j$$$7$^$9!#(B
Hidetoshi NAGAI (Guest)
on 2007-02-25 11:42
(Received via mailing list)
$B1J0f!wCNG=!%6e9)Bg$G$9!%(B

From: "Akinori MUSHA" <removed_email_address@domain.invalid>
Subject: [ruby-dev:30408] Ruby 1.8.6 preview2 has been released
Date: Sun, 25 Feb 2007 00:28:34 +0900
Message-ID: <removed_email_address@domain.invalid>
> $B!!(BRuby 1.8.6 preview2 $B$r%j%j!<%9$7$^$7$?!#(B
      (snip)
> $B!!%F%9%H$7$F$_$FLdBj$rH/8+$5$l$?$i!"$*Aa$a$K$4Js9p$/$@$5$$!#(B

$SAFE==0 $B$J$I$G(B autoload $B$,E,@Z$K@_Dj$5$l$F$$$k>l9g!$(B
$SAFE $B$NCM$KL54X78$K$-$A$s$H(B load $B$5$l$k$Y$-$H;W$$$^$9$7!$(B
$B;v<B!$$3$l$^$G$O$=$N$h$&$KF/$$$F$$$?$N$G$9$,!$(B
20070219 $B$N(B commit
$B$N7k2L!$$&$^$/5!G=$7$J$$$h$&$K$J$C$F$$$^$9!%(B

$BNc$($P(B $SAFE==0 $B$G(B require 'tk'
($BF1;~$K3F%&%#%8%'%C%H%/%i%9$K$D$$$F$O(B
autoload $B$,@_Dj$5$l$^$9(B) $B$7$?8e!$(B$SAFE==4
$B$G$$$:$l$+$N%&%#%8%'%C%H$r(B
$B;HMQ$7$h$&$H$7$F(B autoload $B$,F/$/$H(B SecurityError
$B$K$J$j$^$9!%(B
$B$3$N$^$^(B Ruby 1.8.6 $B$H$7$F%j%j!<%9$5$l$F$7$^$&$H!$(B
$BI,MW$J%&%#%8%'%C%H%/%i%9$@$1$r(B load
$B$9$k$?$a$K%U%!%$%k$rJ,3d$7$F$$$k(B
Ruby/Tk $B$K$H$C$F$O!$6K$a$F:$$C$?;EMMJQ99$H$J$C$F$7$^$$$^$9!%(B

$B<h$j5^$.$NJs9p$N$_$G$9$_$^$;$s$,!$$h$m$7$/$*4j$$$7$^$9!%(B
Hidetoshi NAGAI (Guest)
on 2007-02-25 17:07
(Received via mailing list)
$B1J0f!wCNG=!%6e9)Bg$G$9!%(B

$BJdB->pJs$G$9!%(B

From: Hidetoshi NAGAI <removed_email_address@domain.invalid>
Subject: [ruby-dev:30414] fail to autoload at $SAFE==4 (Re: Ruby 1.8.6
preview2 has been released)
Date: Sun, 25 Feb 2007 18:41:16 +0900
Message-ID: <removed_email_address@domain.invalid>
> $BNc$($P(B $SAFE==0 $B$G(B require 'tk' ($BF1;~$K3F%&%#%8%'%C%H%/%i%9$K$D$$$F$O(B
> autoload $B$,@_Dj$5$l$^$9(B) $B$7$?8e!$(B$SAFE==4 $B$G$$$:$l$+$N%&%#%8%'%C%H$r(B
> $B;HMQ$7$h$&$H$7$F(B autoload $B$,F/$/$H(B SecurityError $B$K$J$j$^$9!%(B

$ ruby -r tk -e 'Thread.new{$SAFE=4; TkButton.new}.value'
$B$GMF0W$K:F8=$G$-$k$H;W$$$^$9!%(B

rb_autoload_load() $B$N(B if $B@a$N>r7oH=CGIt$G(B rb_provided()
$B$r(B
$B8F$s$G$$$^$9$,!$$3$N;~E@$G$O(B $SAFE=4 $B$N$^$^$G$9!%(B
rb_provided() $B$NJQ99$G(B search_required()
$B$r8F$V$h$&$K$J$C$?7k2L!$(B
$SAFE=4 $B$G(B search_required() $B$r8F$s$G$7$^$&$?$a!$(B
SecurityError $B$GMn$A$k$H$$$&$3$H$N$h$&$G$9$M!%(B

$B$G$9$N$G!$(Brb_autoload_load() $B$NLdBjItJ,$r(B
-------------------------------------------------------
    if (!load || !(file = load->nd_lit)) {
      int saved_safe = ruby_safe_level;
      int st;
      ruby_safe_level = load->nd_nth;
      st = rb_provided(RSTRING(file)->ptr);
      ruby_safe_level = saved_safe;
      if (st) return Qfalse;
    }
Nobuyoshi N. (Guest)
on 2007-02-25 17:36
(Received via mailing list)
$B$J$+$@$G$9!#(B

At Sun, 25 Feb 2007 18:41:16 +0900,
Hidetoshi NAGAI wrote in [ruby-dev:30414]:
> $SAFE==0 $B$J$I$G(B autoload $B$,E,@Z$K@_Dj$5$l$F$$$k>l9g!$(B
> $SAFE $B$NCM$KL54X78$K$-$A$s$H(B load $B$5$l$k$Y$-$H;W$$$^$9$7!$(B
> $B;v<B!$$3$l$^$G$O$=$N$h$&$KF/$$$F$$$?$N$G$9$,!$(B
> 20070219 $B$N(B commit $B$N7k2L!$$&$^$/5!G=$7$J$$$h$&$K$J$C$F$$$^$9!%(B

$B$9$$$^$;$s!#$3$l$G$I$&$G$7$g$&!#(B


Index: eval.c
===================================================================
--- eval.c  (revision 11791)
+++ eval.c  (working copy)
@@ -6938,4 +6938,7 @@ static const char *const loadable_ext[]
 };

+static int rb_feature_p _((const char *, const char *, int));
+static int search_required _((VALUE, VALUE *, VALUE *));
+
 static int
 rb_feature_p(feature, ext, rb)
@@ -6974,5 +6977,5 @@ rb_feature_p(feature, ext, rb)
     if (loading_tbl) {
   if (st_lookup(loading_tbl, (st_data_t)feature, 0)) {
-      if (ext) return 'u';
+      if (!ext) return 'u';
       return strcmp(ext, ".rb") ? 's' : 'r';
   }
@@ -6994,6 +6997,4 @@ rb_feature_p(feature, ext, rb)
 }

-static int search_required(VALUE, VALUE *, VALUE *);
-
 int
 rb_provided(feature)
@@ -7004,9 +7005,4 @@ rb_provided(feature)
     if (rb_feature_p(feature, 0, Qfalse))
   return Qtrue;
-    if (search_required(rb_str_new2(feature), &fname, &path) != 0) {
-  feature = RSTRING_PTR(fname);
-  if (rb_feature_p(feature, strrchr(feature, '.'), Qfalse))
-      return Qtrue;
-    }
     return Qfalse;
 }
Hidetoshi NAGAI (Guest)
on 2007-02-25 17:52
(Received via mailing list)
$B1J0f!wCNG=!%6e9)Bg$G$9!%(B

From: Nobuyoshi N. <removed_email_address@domain.invalid>
Subject: [ruby-dev:30418] Re: fail to autoload at $SAFE==4 (Re: Ruby
1.8.6 preview2 has been released)
Date: Mon, 26 Feb 2007 00:35:52 +0900
Message-ID:
<removed_email_address@domain.invalid>
> At Sun, 25 Feb 2007 18:41:16 +0900,
> Hidetoshi NAGAI wrote in [ruby-dev:30414]:
> > $SAFE==0 $B$J$I$G(B autoload $B$,E,@Z$K@_Dj$5$l$F$$$k>l9g!$(B
> > $SAFE $B$NCM$KL54X78$K$-$A$s$H(B load $B$5$l$k$Y$-$H;W$$$^$9$7!$(B
> > $B;v<B!$$3$l$^$G$O$=$N$h$&$KF/$$$F$$$?$N$G$9$,!$(B
> > 20070219 $B$N(B commit $B$N7k2L!$$&$^$/5!G=$7$J$$$h$&$K$J$C$F$$$^$9!%(B
>
> $B$9$$$^$;$s!#$3$l$G$I$&$G$7$g$&!#(B

$B$"$j$,$H$&$4$6$$$^$9!%F0$/$h$&$K$J$j$^$7$?!%(B
ruby_1_8 $B$*$h$S(B ruby_1_8_6 $B$X$N(B commit
$B$r$h$m$7$/$*4j$$$$$?$7$^$9!%(B
Akinori MUSHA (Guest)
on 2007-02-26 07:20
(Received via mailing list)
At Sun, 25 Feb 2007 11:08:31 +0900,
$B$H$_$?$^$5$R$m(B wrote:
> [ruby-dev:30400] $B$r$*4j$$$7$^$9!#(B

$B!!<h$j$3$\$7$9$_$^$;$s!#(Bruby_1_8 $B$KE,MQ$7$^$7$?!#(B

$B!!8e$[$I(B ruby_1_8_6 $B$K$bF~$l$^$9!#(B

--
                     /
                    /__  __            Akinori.org / MUSHA.org
                   / )  )  ) )  /     FreeBSD.org / Ruby-lang.org
Akinori MUSHA aka / (_ /  ( (__(  @ iDaemons.org / and.or.jp

"Different eyes see different things,
    Different hearts beat on different strings --
       But there are times for you and me when all such things agree"
Akinori MUSHA (Guest)
on 2007-02-26 07:21
(Received via mailing list)
At Mon, 26 Feb 2007 00:35:52 +0900,
Nobuyoshi N. wrote:
> At Sun, 25 Feb 2007 18:41:16 +0900,
> Hidetoshi NAGAI wrote in [ruby-dev:30414]:
> > $SAFE==0 $B$J$I$G(B autoload $B$,E,@Z$K@_Dj$5$l$F$$$k>l9g!$(B
> > $SAFE $B$NCM$KL54X78$K$-$A$s$H(B load $B$5$l$k$Y$-$H;W$$$^$9$7!$(B
> > $B;v<B!$$3$l$^$G$O$=$N$h$&$KF/$$$F$$$?$N$G$9$,!$(B
> > 20070219 $B$N(B commit $B$N7k2L!$$&$^$/5!G=$7$J$$$h$&$K$J$C$F$$$^$9!%(B
>
> $B$9$$$^$;$s!#$3$l$G$I$&$G$7$g$&!#(B

$B!!$"$j$,$H$&$4$6$$$^$9!#(Bruby_1_8
$B$K%3%_%C%H$7$F$$$?$@$1$^$9$+!#(B

--
                     /
                    /__  __            Akinori.org / MUSHA.org
                   / )  )  ) )  /     FreeBSD.org / Ruby-lang.org
Akinori MUSHA aka / (_ /  ( (__(  @ iDaemons.org / and.or.jp

"Different eyes see different things,
    Different hearts beat on different strings --
       But there are times for you and me when all such things agree"
Nobuyoshi N. (Guest)
on 2007-02-27 04:01
(Received via mailing list)
$B$J$+$@$G$9!#(B

At Mon, 26 Feb 2007 00:50:48 +0900,
Hidetoshi NAGAI wrote in [ruby-dev:30419]:
> > > $SAFE==0 $B$J$I$G(B autoload $B$,E,@Z$K@_Dj$5$l$F$$$k>l9g!$(B
> > > $SAFE $B$NCM$KL54X78$K$-$A$s$H(B load $B$5$l$k$Y$-$H;W$$$^$9$7!$(B
> >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L$Dj5A$NDj?t$,(Bdefined?$B$d(Bautoload?$B$G??$rJV$9$h$&$K$J$j(B
$B$^$9$,!"<B:]$K;2>H$5$l$l$P(Bconst_missing$B$K$J$k$N$G!"5vMFHO0O$G$O(B
$B$J$+$m$&$+$H!#(B


Index: eval.c
===================================================================
--- eval.c  (revision 11898)
+++ eval.c  (working copy)
@@ -6938,4 +6938,7 @@ static const char *const loadable_ext[]
 };

+static int rb_feature_p _((const char *, const char *, int));
+static int search_required _((VALUE, VALUE *, VALUE *));
+
 static int
 rb_feature_p(feature, ext, rb)
@@ -6974,5 +6977,5 @@ rb_feature_p(feature, ext, rb)
     if (loading_tbl) {
   if (st_lookup(loading_tbl, (st_data_t)feature, 0)) {
-      if (ext) return 'u';
+      if (!ext) return 'u';
       return strcmp(ext, ".rb") ? 's' : 'r';
   }
@@ -6994,19 +6997,22 @@ rb_feature_p(feature, ext, rb)
 }

-static int search_required(VALUE, VALUE *, VALUE *);
-
 int
 rb_provided(feature)
     const char *feature;
 {
-    VALUE fname, path;
+    const char *ext = strrchr(feature, '.');

-    if (rb_feature_p(feature, 0, Qfalse))
-  return Qtrue;
-    if (search_required(rb_str_new2(feature), &fname, &path) != 0) {
-  feature = RSTRING_PTR(fname);
-  if (rb_feature_p(feature, strrchr(feature, '.'), Qfalse))
-      return Qtrue;
+    if (ext && !strchr(ext, '/')) {
+  if (strcmp(".rb", ext) == 0) {
+      if (rb_feature_p(feature, ext, Qtrue)) return Qtrue;
+      return Qfalse;
+  }
+  else if (IS_SOEXT(ext) || IS_DLEXT(ext)) {
+      return Qfalse;  /* may be overriden by .rb file */
+  }
     }
+    if (rb_feature_p(feature, 0, Qfalse) == 'r')
+  return Qtrue;
+
     return Qfalse;
 }
Hidetoshi NAGAI (Guest)
on 2007-02-27 04:46
(Received via mailing list)
$B1J0f!wCNG=!%6e9)Bg$G$9!%(B

From: Nobuyoshi N. <removed_email_address@domain.invalid>
Subject: [ruby-dev:30434] Re: fail to autoload at $SAFE==4
Date: Tue, 27 Feb 2007 11:00:40 +0900
Message-ID:
<removed_email_address@domain.invalid>
> $B$H$$$&$3$H$G9M$($?$N$,!"0J2<$NFs$D$N0F$G$9!#(B
> (1) safe_level$B$r;XDj$7$FC5$7$F$/$l$k(Brb_provided()$B$rDI2C$9$k(B
> (2) rb_provided()$B$O3HD%%i%$%V%i%j$K$D$$$F$O$"$-$i$a$k(B
>
> rb_provided()$B$O(Bautoload$B4XO"$G$7$+;H$o$l$F$$$J$$$N$G!"$H$j$"$($:(B
> $B$O(B(2)$B$G$$$$$N$G$O$J$$$+$H;W$$$^$9!#3HD%%i%$%V%i%j$@$1%m!<%I$5$l(B
> $B$?;~E@$G$OL$Dj5A$NDj?t$,(Bdefined?$B$d(Bautoload?$B$G??$rJV$9$h$&$K$J$j(B
> $B$^$9$,!"<B:]$K;2>H$5$l$l$P(Bconst_missing$B$K$J$k$N$G!"5vMFHO0O$G$O(B
> $B$J$+$m$&$+$H!#(B

$B!V(B(1) $B$G$"$l$P(B autoload $BDj5A;~$N(B $SAFE
$B$G8F$Y$k$N$GM}A[E*$G$O$"$k$,!$(B
$B<BAu$N8z2L$H<j4V$H$r9M$($k$H!%!%!%!W$H$$$&M}2r$G$$$$$G$7$g$&$+!)(B
$B$h$/J,$+$C$F$J$$$N$G$9$,!$(B(2)
$B$N;EMM$G!V%.%c%C!W$H$$$&%1!<%9$O(B
$B$J$$$N$G$7$g$&$+!)(B

# $B;d$,8=:_D>LL$7$F$$$k%1!<%9$G$OLdBj$J$$$h$&$G$9$7!$(B
# $B;d<+?H$O(B (2) $B$G$+$^$o$J$$$N$G$9$,!%!%!%(B
Nobuyoshi N. (Guest)
on 2007-02-27 08:03
(Received via mailing list)
$B$J$+$@$G$9!#(B

At Tue, 27 Feb 2007 11:45:40 +0900,
Hidetoshi NAGAI wrote in [ruby-dev:30435]:
> > $B$H$$$&$3$H$G9M$($?$N$,!"0J2<$NFs$D$N0F$G$9!#(B
> > (1) safe_level$B$r;XDj$7$FC5$7$F$/$l$k(Brb_provided()$B$rDI2C$9$k(B
> > (2) rb_provided()$B$O3HD%%i%$%V%i%j$K$D$$$F$O$"$-$i$a$k(B

$B$b$&0l$D9M$($^$7$?!#(B

(3) autoload$B$r;XDj$7$?$H$-$K<B:]$K%m!<%I$5$l$k$O$:$N%i%$%V%i%j$r(B
    $BC5$7!"(B.rb$B$+(B.so$B$+3NDj$7$F$7$^$&(B

> > rb_provided()$B$O(Bautoload$B4XO"$G$7$+;H$o$l$F$$$J$$$N$G!"$H$j$"$($:(B
> > $B$O(B(2)$B$G$$$$$N$G$O$J$$$+$H;W$$$^$9!#3HD%%i%$%V%i%j$@$1%m!<%I$5$l(B
> > $B$?;~E@$G$OL$Dj5A$NDj?t$,(Bdefined?$B$d(Bautoload?$B$G??$rJV$9$h$&$K$J$j(B
> > $B$^$9$,!"<B:]$K;2>H$5$l$l$P(Bconst_missing$B$K$J$k$N$G!"5vMFHO0O$G$O(B
> > $B$J$+$m$&$+$H!#(B
>
> $B!V(B(1) $B$G$"$l$P(B autoload $BDj5A;~$N(B $SAFE 
$B$G8F$Y$k$N$GM}A[E*$G$O$"$k$,!$(B
> $B<BAu$N8z2L$H<j4V$H$r9M$($k$H!%!%!%!W$H$$$&M}2r$G$$$$$G$7$g$&$+!)(B
> $B$h$/J,$+$C$F$J$$$N$G$9$,!$(B(2) $B$N;EMM$G!V%.%c%C!W$H$$$&%1!<%9$O(B
> $B$J$$$N$G$7$g$&$+!)(B

$B$?$H$($P!"(Bfoo.rb$B$O$J$$$,(BFoo$B$@$1$rDj5A$9$k3HD%%i%$%V%i%j(Bfoo.so$B$O(B
$B$"$k$H$9$k$H!"0J2<$N%3!<%I$O(BNameError$B$K$J$j$^$9!#(B

  autoload :Bar, "foo"
  require "foo"
  Bar if defined?(Bar)

$BK\Mh$J$i!"$b$&(B"foo"$B$H$7$F%m!<%I$G$-$k$b$N$,$J$$$N$@$+$i!":G8e$N(B
defined?(Bar)$B$O(Bnil$B$K$J$k$O$:$G$9!#$b$C$H$b!"(Bdefined?$B$H(BBar$B$N;2>H(B
$B$N4V$K(Bfoo.rb$B$,:n$i$l$J$$$H$$$&J]>Z$O$J$$!"$H9M$($l$P@5$7$$F0:n$+(B
$B$b$7$l$^$;$s$,!#(B

$B:#5$$E$-$^$7$?$,!"F0E*$K%9%/%j%W%H$r(B$LOAD_PATH$B$K:n$k$H$$$&2DG=@-(B
$B$r9M$($k$J$i!"%m!<%I:Q$_$N(B.so$B$NM-L5$r%m!<%ICf$N(B.rb$B$NM-L5$h$j$bM%(B
$B@h$5$;$F$O$^$:$$$N$G!":G8e$N(Bif$BJ8$O$3$&$G$9$M!#(B

    if (rb_feature_p(feature, feature + strlen(feature), Qtrue))
Hidetoshi NAGAI (Guest)
on 2007-02-27 09:29
(Received via mailing list)
$B1J0f!wCNG=!%6e9)Bg$G$9!%(B

From: "Nobuyoshi N." <removed_email_address@domain.invalid>
Subject: [ruby-dev:30437] Re: fail to autoload at $SAFE==4
Date: Tue, 27 Feb 2007 15:02:33 +0900
Message-ID:
<removed_email_address@domain.invalid>
> At Tue, 27 Feb 2007 11:45:40 +0900,
> Hidetoshi NAGAI wrote in [ruby-dev:30435]:
> > > $B$H$$$&$3$H$G9M$($?$N$,!"0J2<$NFs$D$N0F$G$9!#(B
> > > (1) safe_level$B$r;XDj$7$FC5$7$F$/$l$k(Brb_provided()$B$rDI2C$9$k(B
> > > (2) rb_provided()$B$O3HD%%i%$%V%i%j$K$D$$$F$O$"$-$i$a$k(B
>
> $B$b$&0l$D9M$($^$7$?!#(B
>
> (3) autoload$B$r;XDj$7$?$H$-$K<B:]$K%m!<%I$5$l$k$O$:$N%i%$%V%i%j$r(B
>     $BC5$7!"(B.rb$B$+(B.so$B$+3NDj$7$F$7$^$&(B
            ^^^^^^^^^^^^^^$B%U%k%Q%9$G!)(B

autoload $B$rDj5A$9$k;~E@$G!$$-$C$H$I$N%U%!%$%k$+$O(B
$BA[Dj$7$F$$$k$H;W$($k$N$G!$8D?ME*$K$O$3$l$G$b==J,$J5$$O$7$^$9!%(B
$B$G$9$,!$3N$+$KF0E*$JJQ99(B ($LOAD_PATH $BJQ99$r4^$`(B) $B$r(B
$BA[Dj$7$F$$$k2DG=@-$b(B 0 $B$G$O$J$$$G$9$h$M!%(B(^_^;

autoload $B$N;EMM$H$7$F!$(B
 * autoload $B8F$S=P$7;~$K%m!<%I$5$l$k%U%!%$%k$r3NDj$5$;$k!%(B
 * $B<B:]$K%m!<%I$9$k;~E@$G%U%!%$%k$N%?%$%`%9%?%s%W$,JQ2=$7$F$$$?$i(B
   $BNc30(B (SecurityError ?) $B$H$9$k!%(B
$B$H$$$&$N$O!V$"$j!W$G$7$g$&$+!)(B

# $B!V$"$j!W$@$H$7$F$b!$(B1.8 $B$G$NJQ99$O%@%a$G$9$M!%(B

$B$=$l$O$=$l$H$7$F!$:n6H%3%9%H$H8_49@-$H$r9M$($k$H!$(B
1.8 $B$G$O$d$O$j(B (2) $B$rA*Br$9$k$N$,BEEv$H$J$k$N$G$7$g$&$+!)(B
Nobuyoshi N. (Guest)
on 2007-02-27 17:13
(Received via mailing list)
$B$J$+$@$G$9!#(B

At Tue, 27 Feb 2007 16:28:51 +0900,
Hidetoshi NAGAI wrote in [ruby-dev:30438]:
> > (3) autoload$B$r;XDj$7$?$H$-$K<B:]$K%m!<%I$5$l$k$O$:$N%i%$%V%i%j$r(B
> >     $BC5$7!"(B.rb$B$+(B.so$B$+3NDj$7$F$7$^$&(B
>             ^^^^^^^^^^^^^^$B%U%k%Q%9$G!)(B

$B:G=i$O$I$A$i$r;H$&$+$@$1$r9M$($F$$$^$7$?$,!"<B:]$N%U%!%$%k$rC5(B
$B$7$K9T$/0J>e!"%U%k%Q%9$G$J$$$H0UL#$,$J$$$G$7$g$&$M!#(B

> autoload $B$rDj5A$9$k;~E@$G!$$-$C$H$I$N%U%!%$%k$+$O(B
> $BA[Dj$7$F$$$k$H;W$($k$N$G!$8D?ME*$K$O$3$l$G$b==J,$J5$$O$7$^$9!%(B
> $B$G$9$,!$3N$+$KF0E*$JJQ99(B ($LOAD_PATH $BJQ99$r4^$`(B) $B$r(B
> $BA[Dj$7$F$$$k2DG=@-$b(B 0 $B$G$O$J$$$G$9$h$M!%(B(^_^;

$B$"$k$$$O>C$5$l$F$$$?$j$H$+!#(B

> autoload $B$N;EMM$H$7$F!$(B
>  * autoload $B8F$S=P$7;~$K%m!<%I$5$l$k%U%!%$%k$r3NDj$5$;$k!%(B
>  * $B<B:]$K%m!<%I$9$k;~E@$G%U%!%$%k$N%?%$%`%9%?%s%W$,JQ2=$7$F$$$?$i(B
>    $BNc30(B (SecurityError ?) $B$H$9$k!%(B
> $B$H$$$&$N$O!V$"$j!W$G$7$g$&$+!)(B

$B!V$"$j!W$+$b$7$l$^$;$s$,!"$=$3$^$GI,MW$J$N$+$H$+%?%$%`%9%?%s%W(B
$B$@$1$G$$$$$N$+$H$+!"$b$&$A$g$C$H5DO@$OI,MW$G$7$g$&!#(B

> $B$=$l$O$=$l$H$7$F!$:n6H%3%9%H$H8_49@-$H$r9M$($k$H!$(B
> 1.8 $B$G$O$d$O$j(B (2) $B$rA*Br$9$k$N$,BEEv$H$J$k$N$G$7$g$&$+!)(B

$B:n6H%3%9%H$OLdBj$8$c$"$j$^$;$s$,!";~4|E*$K$A$g$C$HBg$-$JJQ99$+(B
$B$H!#(B
Hidetoshi NAGAI (Guest)
on 2007-02-27 23:29
(Received via mailing list)
$B1J0f!wCNG=!%6e9)Bg$G$9!%(B

From: Nobuyoshi N. <removed_email_address@domain.invalid>
Subject: [ruby-dev:30442] Re: fail to autoload at $SAFE==4
Date: Wed, 28 Feb 2007 00:12:02 +0900
Message-ID:
<removed_email_address@domain.invalid>
> At Tue, 27 Feb 2007 16:28:51 +0900,
> Hidetoshi NAGAI wrote in [ruby-dev:30438]:
> > > (3) autoload$B$r;XDj$7$?$H$-$K<B:]$K%m!<%I$5$l$k$O$:$N%i%$%V%i%j$r(B
> > >     $BC5$7!"(B.rb$B$+(B.so$B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K$A$g$C$HBg$-$JJQ99$+(B
> $B$H!#(B

$B$=$&$G$9$M!%(B
$B$3$NLdBj$rJ|CV$7$?$^$^$K(B 1.8.6 $B$r%j%j!<%9$H$$$&$o$1$K$O(B
$B$$$+$J$$$G$7$g$&$7!$8=;~E@$G$NMn$7$I$3$m$H$7$F$O(B
$BE,@Z$J$N$+$b$7$l$^$;$s!%(B

$BFC$KH?BP$,$J$1$l$P!$(Bruby_1_8, ruby_1_8_6 $B$K$O(B
(2) $B$rE,MQ$7$F$7$^$&$H$$$&$3$H$G$$$+$,$G$7$g$&$+!)(B
Akinori MUSHA (Guest)
on 2007-02-28 15:27
(Received via mailing list)
At Wed, 28 Feb 2007 06:28:30 +0900,
Hidetoshi NAGAI wrote:
> $B$3$NLdBj$rJ|CV$7$?$^$^$K(B 1.8.6 $B$r%j%j!<%9$H$$$&$o$1$K$O(B
> $B$$$+$J$$$G$7$g$&$7!$8=;~E@$G$NMn$7$I$3$m$H$7$F$O(B
> $BE,@Z$J$N$+$b$7$l$^$;$s!%(B
>
> $BFC$KH?BP$,$J$1$l$P!$(Bruby_1_8, ruby_1_8_6 $B$K$O(B
> (2) $B$rE,MQ$7$F$7$^$&$H$$$&$3$H$G$$$+$,$G$7$g$&$+!)(B

$B!!(Bruby_1_8 $B$X$NE,MQ$r$*4j$$$7$^$9!#(B

--
                     /
                    /__  __            Akinori.org / MUSHA.org
                   / )  )  ) )  /     FreeBSD.org / Ruby-lang.org
Akinori MUSHA aka / (_ /  ( (__(  @ iDaemons.org / and.or.jp

"Different eyes see different things,
    Different hearts beat on different strings --
       But there are times for you and me when all such things agree"
Hidetoshi NAGAI (Guest)
on 2007-02-28 17:59
(Received via mailing list)
$B1J0f!wCNG=!%6e9)Bg$G$9!%(B

From: "Nobuyoshi N." <removed_email_address@domain.invalid>
Subject: [ruby-dev:30437] Re: fail to autoload at $SAFE==4
Date: Tue, 27 Feb 2007 15:02:33 +0900
Message-ID:
<removed_email_address@domain.invalid>
> $B:#5$$E$-$^$7$?$,!"F0E*$K%9%/%j%W%H$r(B$LOAD_PATH$B$K:n$k$H$$$&2DG=@-(B
> $B$r9M$($k$J$i!"%m!<%I:Q$_$N(B.so$B$NM-L5$r%m!<%ICf$N(B.rb$B$NM-L5$h$j$bM%(B
> $B@h$5$;$F$O$^$:$$$N$G!":G8e$N(Bif$BJ8$O$3$&$G$9$M!#(B
>
>     if (rb_feature_p(feature, feature + strlen(feature), Qtrue))

$B$9$_$^$;$s!%$-$A$s$H%A%'%C%/$7$F$$$^$;$s$G$7$?!%(B
$B$3$N(B if $BJ8$N7A$G(B commit $B$5$l$F$7$^$$$^$7$?$,!$(B
$B$3$l$@$H99$K$^$:$$$_$?$$$G!$(B
-----------------------------------------------------------------------
ruby -r tk -e 'TkButton.new'
/usr/local/lib/ruby/1.8/tk/label.rb:6: uninitialized constant TkLabel
(NameError)
        from /usr/local/lib/ruby/1.8/tk/button.rb:5:in `require'
        from /usr/local/lib/ruby/1.8/tk/button.rb:5
        from -e:1
-----------------------------------------------------------------------
$B$J$s$F$3$H$K$J$C$F$7$^$$$^$9!%(B

TkButton $B$KBP$9$k(B autoload $B$G(B tk/button.rb $B$r(B load
$B$7$?:]$K(B
"require 'tk/label'" $B$,<B9T$5$l!$(Btk/label.rb $B$N>e$N(B
"class TkLabel<TkWindow" $B$G(B NameError $BH/@8!$$H$$$&N.$l$G$9!%(B

$B>e5-$N(B if $BJ8$NItJ,$,(B "if (rb_feature_p(feature, 0, Qfalse)
== 'r')"
$B$G$"$l$P!$$3$N$h$&$K$O$J$j$^$;$s!%(B
Akinori MUSHA (Guest)
on 2007-03-03 08:33
(Received via mailing list)
At Thu, 1 Mar 2007 00:57:53 +0900,
Hidetoshi NAGAI wrote:
> すみません.きちんとチェックしていませんでした.
> なんてことになってしまいます.
>
> TkButton に対する autoload で tk/button.rb を load した際に
> "require 'tk/label'" が実行され,tk/label.rb の上の
> "class TkLabel<TkWindow" で NameError 発生,という流れです.
>
> 上記の if 文の部分が "if (rb_feature_p(feature, 0, Qfalse) == 'r')"
> であれば,このようにはなりません.

 この件はどうしましょうか。

--
                     /
                    /__  __            Akinori.org / MUSHA.org
                   / )  )  ) )  /     FreeBSD.org / Ruby-lang.org
Akinori MUSHA aka / (_ /  ( (__(  @ iDaemons.org / and.or.jp

"Different eyes see different things,
    Different hearts beat on different strings --
       But there are times for you and me when all such things agree"
Akinori MUSHA (Guest)
on 2007-03-03 11:45
(Received via mailing list)
At Sat, 3 Mar 2007 15:32:09 +0900,
I wrote:
> > >     if (rb_feature_p(feature, feature + strlen(feature), Qtrue))
> >         from -e:1
>  この件はどうしましょうか。
 その後の中田さんのコミットで修正されたようです。
ruby_1_8_6 にも入れました。

--
                     /
                    /__  __            Akinori.org / MUSHA.org
                   / )  )  ) )  /     FreeBSD.org / Ruby-lang.org
Akinori MUSHA aka / (_ /  ( (__(  @ iDaemons.org / and.or.jp

"Different eyes see different things,
    Different hearts beat on different strings --
       But there are times for you and me when all such things agree"
This topic is locked and can not be replied to.