summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--error.c2
-rw-r--r--eval.c4
-rw-r--r--lib/drb/drb.rb4
-rw-r--r--lib/drb/invokemethod.rb2
-rw-r--r--test/drb/drbtest.rb4
-rw-r--r--test/openssl/test_ssl.rb12
7 files changed, 21 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index fb2460c91b..eae1d3a324 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
* env.h: remove argv from ruby_frame.
diff --git a/error.c b/error.c
index d6f5485933..e060ea0461 100644
--- a/error.c
+++ b/error.c
@@ -280,7 +280,7 @@ rb_check_type(x, t)
}
type++;
}
- rb_bug("unknown type 0x%x", t);
+ rb_bug("unknown type 0x%x (0x%x given)", t, TYPE(x));
}
}
diff --git a/eval.c b/eval.c
index 712699e108..4cc55b728a 100644
--- a/eval.c
+++ b/eval.c
@@ -5539,8 +5539,8 @@ rb_call0(klass, recv, id, oid, argc, argv, body, nosuper)
result = rb_ivar_set(recv, body->nd_vid, argv[0]);
break;
- case NODE_ZSUPER:
- result = rb_eval(recv, body);
+ case NODE_ZSUPER: /* visibility override */
+ result = rb_call_super(argc, argv);
break;
case NODE_BMETHOD:
diff --git a/lib/drb/drb.rb b/lib/drb/drb.rb
index 8919a946b9..eb2d0d1459 100644
--- a/lib/drb/drb.rb
+++ b/lib/drb/drb.rb
@@ -564,7 +564,7 @@ module DRb
rescue
raise(DRbConnError, $!.message, $!.backtrace)
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
begin
Marshal::load(str)
@@ -1395,7 +1395,7 @@ module DRb
@result = perform_without_block
end
@succ = true
- if @msg_id == :to_ary && @result.class == Values
+ if @msg_id == :to_ary
@result = DRbArray.new(@result)
end
return @succ, @result
diff --git a/lib/drb/invokemethod.rb b/lib/drb/invokemethod.rb
index 7cea01707f..a59b41d0a0 100644
--- a/lib/drb/invokemethod.rb
+++ b/lib/drb/invokemethod.rb
@@ -9,7 +9,7 @@ module DRb
end
block_value = @block.call(*x)
end
-
+
def perform_with_block
@obj.__send__(@msg_id, *@argv) do |*x|
jump_error = nil
diff --git a/test/drb/drbtest.rb b/test/drb/drbtest.rb
index 6fd0f94d5e..13f879558f 100644
--- a/test/drb/drbtest.rb
+++ b/test/drb/drbtest.rb
@@ -14,9 +14,9 @@ class DRbService
@@manager = DRb::ExtServManager.new
@@ruby = EnvUtil.rubybin
@@ruby += " -d" if $DEBUG
- @@dir = File.dirname(File.expand_path(__FILE__))
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
%w(ut_drb.rb ut_array.rb ut_port.rb ut_large.rb ut_safe1.rb ut_eval.rb).each do |nm|
diff --git a/test/openssl/test_ssl.rb b/test/openssl/test_ssl.rb
index 60e9f46b79..dbc8f13902 100644
--- a/test/openssl/test_ssl.rb
+++ b/test/openssl/test_ssl.rb
@@ -6,14 +6,18 @@ end
require "rbconfig"
require "socket"
require "test/unit"
+begin
+ loadpath = $:.dup
+ $:.replace($: | [File.expand_path("../ruby", File.dirname(__FILE__))])
+ require 'envutil'
+ensure
+ $:.replace(loadpath)
+end
if defined?(OpenSSL)
class OpenSSL::TestSSL < Test::Unit::TestCase
- RUBY = ENV["RUBY"] || File.join(
- ::Config::CONFIG["bindir"],
- ::Config::CONFIG["ruby_install_name"] + ::Config::CONFIG["EXEEXT"]
- )
+ RUBY = EnvUtil.rubybin
SSL_SERVER = File.join(File.dirname(__FILE__), "ssl_server.rb")
PORT = 20443
ITERATIONS = ($0 == __FILE__) ? 100 : 10