From cc6799168a4923a0c0a2ae5d2199dd560fccb302 Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 5 Oct 2005 16:15:16 +0000 Subject: * range.c (rb_range_beg_len): should return Qfalse for non-range object. * pack.c (EXTEND16): [ruby-dev:27383] * eval.c (set_trace_func): add rb_secure(4) to prevent adding tracing function. * lib/delegate.rb: document update from James Edward Gray II . [ruby-core:05942] * process.c (proc_daemon): should restrict execution on levels higher than $SAFE=2. suggested by URABE Shyouhei . * lib/forwardable.rb: replaced by new implementation from . [ruby-core:05899] * file.c (path_check_0): disallow sticky world writable directory in PATH (and $LOAD_PATH). [ruby-dev:27226] * numeric.c (fix_idiv): 1.div(1.0) should return integer value. [ruby-dev:27235] * lib/yaml.rb: require 'yaml/constants'. [ruby-core:5776] * lib/xmlrpc/client.rb (XMLRPC::Client::do_rpc): add charset information to content-type header.[ruby-core:5127] * lib/xmlrpc/server.rb (CGIServer::serve): ditto. * lib/xmlrpc/server.rb (ModRubyServer::serve): ditto. * lib/xmlrpc/server.rb (WEBrickServlet::service): ditto. * test/dbm/test_dbm.rb (TestDBM::test_s_open_error): remove test_s_open_error test to detect duplicate open. [ruby-dev:27202] * eval.c (splat_value): use to_a to splat non Array object. * object.c (nil_to_a): remove nil.to_a. [experimental] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- eval.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'eval.c') diff --git a/eval.c b/eval.c index 4b5e0eb69..54ca11cfa 100644 --- a/eval.c +++ b/eval.c @@ -2464,6 +2464,7 @@ set_trace_func(VALUE obj, VALUE trace) { rb_event_hook_t *hook; + rb_secure(4); if (NIL_P(trace)) { trace_func = 0; rb_remove_event_hook(call_trace_func); @@ -2644,11 +2645,7 @@ avalue_splat(VALUE v) static VALUE splat_value(VALUE v) { - VALUE tmp = rb_check_array_type(v); - - if (NIL_P(tmp)) v = rb_ary_new3(1, v); - else v = tmp; - return rb_values_from_ary(v); + return rb_values_from_ary(rb_convert_type(v, T_ARRAY, "Array", "to_a")); } static VALUE -- cgit