diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | lib/yaml/tag.rb | 7 | ||||
-rw-r--r-- | signal.c | 17 |
3 files changed, 20 insertions, 11 deletions
@@ -1,3 +1,10 @@ +Fri Apr 27 02:00:17 2007 Ryan Davis <ryand-ruby@zenspider.com> + + * 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 <nobu@ruby-lang.org> * 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 @@ -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 |