[#8976] Insecure warnings on sticky-bit directories — "Laurent Sansonetti" <laurent.sansonetti@...>
Hi,
[#8978] Inheritance and Autorunner: Default_test causes a problem — <noreply@...>
Bugs item #5990, was opened at 2006-10-02 10:05
Hi,
[#8997] Re: [ruby-cvs:18323] ruby: * eval.c (splat_value): use "to_splat" instead of "to_ary" to — Mathieu Bouchard <matju@...>
On Tue, 3 Oct 2006, matz wrote:
Hi,
On Wed, 4 Oct 2006, Yukihiro Matsumoto wrote:
Hi,
Hi --
Yukihiro Matsumoto wrote:
Hi,
Hi --
Hi,
Hi --
Hi,
Hi --
On Oct 9, 2006, at 10:19 AM, dblack@wobblini.net wrote:
On 2006.10.10 00:31, James Edward Gray II wrote:
On Oct 9, 2006, at 11:50 AM, Eero Saynatkari wrote:
Hi --
dblack@wobblini.net wrote:
Thomas Enebo wrote:
Hi --
Hi --
Hi,
Hi --
Hi,
On 10/10/06, Yukihiro Matsumoto <matz@ruby-lang.org> wrote:
Hi,
On Oct 10, 2006, at 8:43 AM, Yukihiro Matsumoto wrote:
From: <dblack@wobblini.net>
Hi --
> to_a was too general. All enumerable objects (and even
Brown, Warren wrote:
> -----Original Message-----
[#8999] making FileUtils.rm_rf robust: is anyone interested? — Jim Meyering <list+ruby@...>
Hello,
Hi,
"Nobuyoshi Nakada" <nobu@ruby-lang.org> wrote:
[#9014] C#'s ?? Operator — "Nikolai Weibull" <now@...>
Hi!
[#9021] argument passing bug — Mathieu Bouchard <matju@...>
[#9024] — Shashank Date <sdate@...>
Hi All,
[#9077] how to create a NODE_ARGSPUSH? — Ryan Davis <ryand-ruby@...>
Is it possible for plain ruby code to create a NODE_ARGSPUSH? It
[#9104] Loop over array.delete breaks at first hit — <noreply@...>
Bugs item #6090, was opened at 2006-10-10 22:33
Hi,
[#9119] What about 'splay'? — dblack@...
Hi --
On 2006.10.12 02:32, dblack@wobblini.net wrote:
On Wednesday 11 October 2006 13:55, Eero Saynatkari wrote:
Hi --
dblack@wobblini.net wrote:
Hi --
On 2006.10.12 03:36, Sean Russell wrote:
On 10/11/06, dblack@wobblini.net <dblack@wobblini.net> wrote:
[#9152] regular expressions tainting? — hadmut@... (Hadmut Danisch)
Hi,
Hi,
On Thu, Oct 12, 2006 at 01:01:36PM +0900, Nobuyoshi Nakada wrote:
It's worse:
Hi,
On Oct 15, 2006, at 1:20 AM, Hadmut Danisch wrote:
On Sun, Oct 15, 2006 at 05:33:16PM +0900, Eric Hodel wrote:
[#9158] Module#class_variable_defined? — Mauricio Fernandez <mfp@...>
[#9188] Symbol < String in Ruby > 1.8 — dblack@...
Hi --
Hi
Yukihiro Matsumoto wrote:
Charles Oliver Nutter wrote:
Charles Oliver Nutter wrote:
Jim Weirich wrote:
On Thu, Oct 19, 2006 at 05:06:02AM +0900, Charles Oliver Nutter wrote:
Hi,
Quoting matz@ruby-lang.org, on Thu, Oct 19, 2006 at 01:40:42PM +0900:
Hi,
Quoting matz@ruby-lang.org, on Thu, Oct 19, 2006 at 02:49:30PM +0900:
Hi,
Quoting matz@ruby-lang.org, on Thu, Oct 19, 2006 at 11:22:18PM +0900:
On 10/15/06, dblack@wobblini.net <dblack@wobblini.net> wrote:
Hi --
On 10/15/06, dblack@wobblini.net <dblack@wobblini.net> wrote:
Hi,
On 10/16/06, Yukihiro Matsumoto <matz@ruby-lang.org> wrote:
On Oct 16, 2006, at 3:06 PM, Rick DeNatale wrote:
On Tue, Oct 17, 2006 at 05:14:09AM +0900, James Edward Gray II wrote:
On 10/16/06, Sam Roberts <sroberts@uniserve.com> wrote:
Hi,
Hi --
On Oct 17, 2006, at 7:29 PM, dblack@wobblini.net wrote:
Hi --
On Oct 18, 2006, at 4:18 AM, dblack@wobblini.net wrote:
On 10/18/06, Eric Hodel <drbrain@segment7.net> wrote:
On 10/18/06, Nikolai Weibull <now@bitwi.se> wrote:
On 10/18/06, mathew <meta@pobox.com> wrote:
On Thu, Oct 19, 2006 at 04:24:24AM +0900, Nikolai Weibull wrote:
On 10/18/06, Mauricio Fernandez <mfp@acm.org> wrote:
Hi --
On 10/18/06, dblack@wobblini.net <dblack@wobblini.net> wrote:
Hi -
Hi,
Hi --
Rick DeNatale wrote:
Hi --
Hi,
Hi --
On 10/19/06, dblack@wobblini.net <dblack@wobblini.net> wrote:
Hi --
On 10/19/06, dblack@wobblini.net <dblack@wobblini.net> wrote:
Hi --
dblack@wobblini.net wrote:
Hi --
Hi,
Hi --
Hi,
Hi --
On 10/20/06, dblack@wobblini.net <dblack@wobblini.net> wrote:
Hi --
Hi,
On Sat, Oct 21, 2006 at 01:11:36AM +0900, dblack@wobblini.net wrote:
Hi,
On Oct 18, 2006, at 11:37 AM, Nikolai Weibull wrote:
[#9197] Ruby Threads — "Abhisek Datta" <abhisek@...>
Hello,
[#9282] Re: String not enumerable, what about IO? — "Michael Selig" <michael.selig@...>
I am fairly new to ruby, and I have just started listening to this mailing
[#9341] array.c - defining aliases as aliases — "Daniel Berger" <djberg96@...>
Hi all,
On Oct 27, 2006, at 11:12 AM, Daniel Berger wrote:
[#9351] Module#method_aliased and Module#singleton_method_aliased — "Daniel Berger" <djberg96@...>
Hi all,
[RCR] Module#method_aliased and Module#singleton_method_aliased
Hi all,
Since David mentioned that RCRchive is being reworked, I thought I'd propose
this here.
Abstract:
Add the Module#method_aliased and Method#singleton_method_aliased hooks.
Problem:
There is currently no hook to determine whether or not a method has been
aliased. In some circumstances a user may want to ensure that the
aliased
methods for their class are automatically remapped if the original method
is
redefined.
Proposal:
The ability to automatically remap aliased methods can be accomplished if
we add the Module#method_aliased and Method#singleton_method_aliased
methods.
Consider the following example:
class Foo
def bar; "bar"; end
alias baz bar
end
puts Foo.new.bar => "bar"
puts Foo.new.baz => "bar"
Then later on, you decide to re-open the Foo#bar method:
class Foo
def bar
"test"
end
end
puts Foo.new.bar => "test"
puts Foo.new.baz => "bar" # Alias doesn't get remapped
With our hypothetical Module#method_aliased method, a user could
automatically remap any aliases by combining it with Module#method_added:
class Foo
@@aliases = Hash.new{ |hash, key| hash[key] = [] }
def self.method_aliased(new_id, old_id)
new_name = new_id.id2name
old_name = old_id.id2name
unless @@aliases[old_name].include?(new_name)
@@aliases[old_name] << new_name
end
end
def self.method_added(id)
return unless @@aliases.keys.include?(id.id2name)
@@aliases.each{ |method, aliases|
aliases.each{ |a|
alias_method a.to_sym, id
}
}
end
def bar
"bar"
end
alias baz bar
end
puts Foo.new.bar => "bar"
puts Foo.new.baz => "bar"
class Foo
def bar
"test"
end
end
puts Foo.new.bar => "test"
puts Foo.new.baz => "test"
Analysis:
No incompatibilities. Requires minimal code changes to object.c and
eval.c.
Implementation:
--- object.orig 2006-10-28 10:19:19.000000000 -0600
+++ object.c 2006-10-28 13:16:08.000000000 -0600
@@ -493,7 +493,6 @@
return Qfalse;
}
-
/*
* Document-method: singleton_method_added
*
@@ -2570,7 +2569,7 @@
rb_define_private_method(rb_cModule, "method_added", rb_obj_dummy, 1);
rb_define_private_method(rb_cModule, "method_removed", rb_obj_dummy,
1);
rb_define_private_method(rb_cModule, "method_undefined", rb_obj_dummy,
1);
-
+ rb_define_private_method(rb_cModule, "method_aliased", rb_obj_dummy,
2);
rb_define_method(rb_mKernel, "nil?", rb_false, 0);
rb_define_method(rb_mKernel, "==", rb_obj_equal, 1);
@@ -2618,6 +2617,7 @@
rb_define_private_method(rb_mKernel, "singleton_method_added",
rb_obj_dummy, 1);
rb_define_private_method(rb_mKernel, "singleton_method_removed",
rb_obj_dummy, 1);
rb_define_private_method(rb_mKernel, "singleton_method_undefined",
rb_obj_dummy, 1);
+ rb_define_private_method(rb_mKernel, "singleton_method_aliased",
rb_obj_dummy, 2);
rb_define_global_function("sprintf", rb_f_sprintf, -1); /* in sprintf.c*/
rb_define_global_function("format", rb_f_sprintf, -1); /* in sprintf.c
*/
@@ -2742,4 +2742,5 @@
id_eql = rb_intern("eql?");
id_inspect = rb_intern("inspect");
id_init_copy = rb_intern("initialize_copy");
+
}
--- eval.orig 2006-10-28 10:19:08.000000000 -0600
+++ eval.c 2006-10-28 13:17:42.000000000 -0600
@@ -408,6 +408,7 @@
static ID init, eqq, each, aref, aset, match, missing;
static ID added, singleton_added;
static ID __id__, __send__, respond_to;
+static ID alias_added, singleton_alias_added;
#define NOEX_TAINTED 8
#define NOEX_SAFE(n) ((n) >> 4)
@@ -2163,9 +2164,11 @@
NOEX_WITH_SAFE(orig->nd_noex)));
if (singleton) {
rb_funcall(singleton, singleton_added, 1, ID2SYM(name));
+ rb_funcall(singleton, singleton_alias_added, 2, ID2SYM(name),
ID2SYM(def));
}
else {
rb_funcall(klass, added, 1, ID2SYM(name));
+ rb_funcall(klass, alias_added, 2, ID2SYM(name), ID2SYM(def));
}
}
@@ -7884,7 +7887,9 @@
match = rb_intern("=~");
missing = rb_intern("method_missing");
added = rb_intern("method_added");
+ alias_added = rb_intern("method_aliased");
singleton_added = rb_intern("singleton_method_added");
+ singleton_alias_added = rb_intern("singleton_method_aliased");
removed = rb_intern("method_removed");
singleton_removed = rb_intern("singleton_method_removed");
undefined = rb_intern("method_undefined");