From dda452747887037dc5f1969b3f23403bb592c084 Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 26 Apr 2007 17:06:54 +0000 Subject: Fixed raise Interrupt and Module rdoc git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 7 +++++++ lib/yaml/tag.rb | 7 +++---- signal.c | 17 ++++++++++------- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index a1d7e660c0..2da62025fe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Fri Apr 27 02:00:17 2007 Ryan Davis + + * signal.c: Fixed backwards compatibility for 'raise Interrupt'. + + * lib/yaml/tag.rb: Running rdoc over the 1.8.6 tree skips + Module. Patch from James Britt + Thu Apr 26 13:54:51 2007 Nobuyoshi Nakada * misc/ruby-style.el: new file. C/C++ style for ruby source code. diff --git a/lib/yaml/tag.rb b/lib/yaml/tag.rb index 0fb6bef9a0..56c3513bc0 100644 --- a/lib/yaml/tag.rb +++ b/lib/yaml/tag.rb @@ -51,12 +51,11 @@ module YAML end class Module - # :stopdoc: # Adds a taguri _tag_ to a class, used when dumping or loading the class # in YAML. See YAML::tag_class for detailed information on typing and # taguris. - def yaml_as( tag, sc = true ) + def yaml_as( tag, sc = true ) # :nodoc: verbose, $VERBOSE = $VERBOSE, nil class_eval <<-"end;", __FILE__, __LINE__+1 attr_writer :taguri @@ -80,12 +79,12 @@ class Module end # Transforms the subclass name into a name suitable for display # in a subclassed tag. - def yaml_tag_class_name + def yaml_tag_class_name # :nodoc: self.name end # Transforms the subclass name found in the tag into a Ruby # constant name. - def yaml_tag_read_class( name ) + def yaml_tag_read_class( name ) # :nodoc: name end end diff --git a/signal.c b/signal.c index 0f1171b30b..4f57d455b2 100644 --- a/signal.c +++ b/signal.c @@ -264,14 +264,17 @@ esignal_init(argc, argv, self) } static VALUE -interrupt_init(self, mesg) - VALUE self, mesg; +interrupt_init(argc, argv, self) + int argc; + VALUE *argv; + VALUE self; { - VALUE argv[2]; + VALUE args[2]; - argv[0] = INT2FIX(SIGINT); - argv[1] = mesg; - return rb_call_super(2, argv); + args[0] = INT2FIX(SIGINT); + rb_scan_args(argc, argv, "01", &args[1]); + + return rb_call_super(2, args); } void @@ -1071,7 +1074,7 @@ Init_signal() rb_define_method(rb_eSignal, "initialize", esignal_init, -1); rb_attr(rb_eSignal, rb_intern("signo"), 1, 0, 0); rb_alias(rb_eSignal, rb_intern("signm"), rb_intern("message")); - rb_define_method(rb_eInterrupt, "initialize", interrupt_init, 1); + rb_define_method(rb_eInterrupt, "initialize", interrupt_init, -1); install_sighandler(SIGINT, sighandler); #ifdef SIGHUP -- cgit v1.2.3