1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* array.c (rb_ary_to_ary): do not use #respond_to? to detect

to_ary.  Just call.  [ruby-core:23738]

* eval.c (rb_check_funcall): new function with method existence
  check.  returns Qundef when the method does not exist.

* enumerator.c (enumerator_rewind): just call method, using
  rb_check_funcall().  [ruby-core:23738]

* error.c (exc_equal): ditto.

* object.c (convert_type): ditto.

* error.c (rb_name_err_mesg_new): export function.

* eval.c (make_exception): ditto.

* io.c (pop_last_hash): return early when the last argument is nil.

* io.c (rb_io_puts): treat T_STRING specially for small
  optimization. 

* vm_eval.c (raise_method_missing): skip method call if possible
  using rb_method_basic_definition_p().

* vm_eval.c (method_missing): ditto.

* test/ruby/test_rubyoptions.rb (TestRubyOptions#test_debug): test
  suites changed to ignore exceptions caused by just-call policy.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2009-10-29 04:55:10 +00:00
parent 2bb26c118d
commit 0580ba0611
11 changed files with 129 additions and 39 deletions

View file

@ -53,9 +53,9 @@ class TestRubyOptions < Test::Unit::TestCase
end
def test_debug
assert_in_out_err(%w(-de) + ["p $DEBUG"], "", %w(true), [])
assert_in_out_err(%w(-de) + ["p $DEBUG"], "", %w(true), //)
assert_in_out_err(%w(--debug -e) + ["p $DEBUG"], "", %w(true), [])
assert_in_out_err(%w(--debug -e) + ["p $DEBUG"], "", %w(true), //)
end
def test_verbose