diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-07-14 04:34:43 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-07-14 04:34:43 +0000 |
commit | ce175376b2a0460d746270831d35240595cac276 (patch) | |
tree | 4db0e4a9b7f8a22513a4fd558425cb0fbaf5eb57 | |
parent | 1ad26ccf354816b68273e0d9c82594fbcf009f29 (diff) |
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | eval.c | 8 | ||||
-rw-r--r-- | ext/tk/lib/tk.rb | 13 | ||||
-rw-r--r-- | instruby.rb | 2 | ||||
-rw-r--r-- | sample/irb.rb | 3 |
5 files changed, 27 insertions, 8 deletions
@@ -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> @@ -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 */ diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb index b495a2e2d1..4b1c21f40a 100644 --- a/ext/tk/lib/tk.rb +++ b/ext/tk/lib/tk.rb @@ -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 diff --git a/instruby.rb b/instruby.rb index 601debfa1e..809ab86f3f 100644 --- a/instruby.rb +++ b/instruby.rb @@ -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]) diff --git a/sample/irb.rb b/sample/irb.rb index 38d184dfd0..6746c59d42 100644 --- a/sample/irb.rb +++ b/sample/irb.rb @@ -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__) |