Skip to content

Commit

Permalink
[DOC] Added Exception.exception to Exception.new [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Jun 18, 2020
1 parent e14cba3 commit 9578256
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions error.c
Expand Up @@ -1003,7 +1003,8 @@ exc_init(VALUE exc, VALUE mesg)

/*
* call-seq:
* Exception.new(msg = nil) -> exception
* Exception.new(msg = nil) -> exception
* Exception.exception(msg = nil) -> exception
*
* Construct a new Exception object, optionally passing in
* a message.
Expand Down Expand Up @@ -2572,7 +2573,7 @@ void
Init_Exception(void)
{
rb_eException = rb_define_class("Exception", rb_cObject);
rb_define_singleton_method(rb_eException, "exception", rb_class_new_instance, -1);
rb_define_alias(rb_singleton_class(rb_eException), "exception", "new");
rb_define_singleton_method(rb_eException, "to_tty?", exc_s_to_tty_p, 0);
rb_define_method(rb_eException, "exception", exc_exception, -1);
rb_define_method(rb_eException, "initialize", exc_initialize, -1);
Expand Down

0 comments on commit 9578256

Please sign in to comment.