1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2000-07-14 04:34:43 +00:00
parent 1ad26ccf35
commit ce175376b2
5 changed files with 27 additions and 8 deletions

View file

@ -1,3 +1,10 @@
Fri Jul 14 12:49:50 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
* eval.c (rb_eval): should preserve errinfo even if return, break,
etc. is called in rescue clause.
* instruby.rb: install irb too.
Wed Jul 12 15:32:57 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
* variable.c (rb_const_get): constants for builtin classes must
@ -10,7 +17,7 @@ Wed Jul 12 15:06:28 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
* eval.c (rb_eval): use rb_const_get_at().
* variable.c (rb_const_get_at): retrieve toplevel constants only,
* variable.c (top_const_get): retrieve toplevel constants only,
not ones of Object (and its included modules) in general.
Wed Jul 12 15:04:11 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>

8
eval.c
View file

@ -2219,13 +2219,13 @@ rb_eval(self, n)
result = rb_eval(self, resq->nd_body);
}
POP_TAG();
if (state == 0) {
ruby_errinfo = e_info;
}
else if (state == TAG_RETRY) {
if (state == TAG_RETRY) {
state = 0;
goto retry_entry;
}
if (state != TAG_RAISE) {
ruby_errinfo = e_info;
}
break;
}
resq = resq->nd_head; /* next rescue */

View file

@ -219,6 +219,17 @@ module TkComm
end
private :_get_eval_string
def ruby2tcl(v)
if v.kind_of?(Hash)
v = hash_kv(v)
v.flatten!
v.collect{|e|ruby2tcl(e)}
else
_get_eval_string(v)
end
end
private :ruby2tcl
Tk_IDs = [0, 0] # [0]-cmdid, [1]-winid
def _curr_cmd_id
id = format("c%.4d", Tk_IDs[0])
@ -541,7 +552,7 @@ module TkCore
def tk_call(*args)
print args.join(" "), "\n" if $DEBUG
args.collect! {|x|_get_eval_string(x)}
args.collect! {|x|ruby2tcl(x)}
args.compact!
args.flatten!
begin

View file

@ -69,6 +69,8 @@ else
end
Dir.chdir CONFIG["srcdir"]
File.install "sample/irb.rb", "#{bindir}/irb", 0755, true
Find.find("lib") do |f|
next unless /\.rb$/ =~ f
dir = rubylibdir+"/"+File.dirname(f[4..-1])

View file

@ -19,8 +19,7 @@ if __FILE__ == $0
IRB.start(__FILE__)
else
# check -e option
tmp = ENV["TMP"] || ENV["TMPDIR"] || "/tmp"
if %r|#{tmp}/rb| =~ $0
if /^-e$/ =~ $0
IRB.start(__FILE__)
else
IRB.initialize(__FILE__)