* eval.c (rb_call0): should call rb_call_super() directly for

visibility overriding.  [ruby-dev:23989]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2004-07-28 09:05:08 +00:00
parent 3f1f17c8c5
commit 1bd47bf0bc
7 changed files with 21 additions and 12 deletions

View File

@ -1,3 +1,8 @@
Wed Jul 28 15:44:08 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
* eval.c (rb_call0): should call rb_call_super() directly for
visibility overriding. [ruby-dev:23989]
Wed Jul 28 01:04:44 2004 Yukihiro Matsumoto <matz@ruby-lang.org> Wed Jul 28 01:04:44 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
* env.h: remove argv from ruby_frame. * env.h: remove argv from ruby_frame.

View File

@ -280,7 +280,7 @@ rb_check_type(x, t)
} }
type++; type++;
} }
rb_bug("unknown type 0x%x", t); rb_bug("unknown type 0x%x (0x%x given)", t, TYPE(x));
} }
} }

4
eval.c
View File

@ -5539,8 +5539,8 @@ rb_call0(klass, recv, id, oid, argc, argv, body, nosuper)
result = rb_ivar_set(recv, body->nd_vid, argv[0]); result = rb_ivar_set(recv, body->nd_vid, argv[0]);
break; break;
case NODE_ZSUPER: case NODE_ZSUPER: /* visibility override */
result = rb_eval(recv, body); result = rb_call_super(argc, argv);
break; break;
case NODE_BMETHOD: case NODE_BMETHOD:

View File

@ -564,7 +564,7 @@ module DRb
rescue rescue
raise(DRbConnError, $!.message, $!.backtrace) raise(DRbConnError, $!.message, $!.backtrace)
end end
raise(DRbConnError, 'connection closed') if sz.nil? raise(DRbConnError, 'connection closed') if str.nil?
raise(DRbConnError, 'premature marshal format(can\'t read)') if str.size < sz raise(DRbConnError, 'premature marshal format(can\'t read)') if str.size < sz
begin begin
Marshal::load(str) Marshal::load(str)
@ -1395,7 +1395,7 @@ module DRb
@result = perform_without_block @result = perform_without_block
end end
@succ = true @succ = true
if @msg_id == :to_ary && @result.class == Values if @msg_id == :to_ary
@result = DRbArray.new(@result) @result = DRbArray.new(@result)
end end
return @succ, @result return @succ, @result

View File

@ -9,7 +9,7 @@ module DRb
end end
block_value = @block.call(*x) block_value = @block.call(*x)
end end
def perform_with_block def perform_with_block
@obj.__send__(@msg_id, *@argv) do |*x| @obj.__send__(@msg_id, *@argv) do |*x|
jump_error = nil jump_error = nil

View File

@ -14,9 +14,9 @@ class DRbService
@@manager = DRb::ExtServManager.new @@manager = DRb::ExtServManager.new
@@ruby = EnvUtil.rubybin @@ruby = EnvUtil.rubybin
@@ruby += " -d" if $DEBUG @@ruby += " -d" if $DEBUG
@@dir = File.dirname(File.expand_path(__FILE__))
def self.add_service_command(nm) def self.add_service_command(nm)
DRb::ExtServManager.command[nm] = "#{@@ruby} #{@@dir}/#{nm}" dir = File.dirname(File.expand_path(__FILE__))
DRb::ExtServManager.command[nm] = "#{@@ruby} #{dir}/#{nm}"
end end
%w(ut_drb.rb ut_array.rb ut_port.rb ut_large.rb ut_safe1.rb ut_eval.rb).each do |nm| %w(ut_drb.rb ut_array.rb ut_port.rb ut_large.rb ut_safe1.rb ut_eval.rb).each do |nm|

View File

@ -6,14 +6,18 @@ end
require "rbconfig" require "rbconfig"
require "socket" require "socket"
require "test/unit" require "test/unit"
begin
loadpath = $:.dup
$:.replace($: | [File.expand_path("../ruby", File.dirname(__FILE__))])
require 'envutil'
ensure
$:.replace(loadpath)
end
if defined?(OpenSSL) if defined?(OpenSSL)
class OpenSSL::TestSSL < Test::Unit::TestCase class OpenSSL::TestSSL < Test::Unit::TestCase
RUBY = ENV["RUBY"] || File.join( RUBY = EnvUtil.rubybin
::Config::CONFIG["bindir"],
::Config::CONFIG["ruby_install_name"] + ::Config::CONFIG["EXEEXT"]
)
SSL_SERVER = File.join(File.dirname(__FILE__), "ssl_server.rb") SSL_SERVER = File.join(File.dirname(__FILE__), "ssl_server.rb")
PORT = 20443 PORT = 20443
ITERATIONS = ($0 == __FILE__) ? 100 : 10 ITERATIONS = ($0 == __FILE__) ? 100 : 10