diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-07-22 03:50:33 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-07-22 03:50:33 +0000 |
commit | b74286e423abd50d8e697abd242c16bc683b6357 (patch) | |
tree | 891f58582e536897e5a10038bd3c037f271051b5 | |
parent | 7958edbcdcf11706cff27891687c8d1f92166c8f (diff) |
* lib/irb/ruby-lex.rb (RubyLex::identify_string): %s string do not
process expression interpolation. [ruby-talk:106691]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | eval.c | 3 | ||||
-rw-r--r-- | lib/debug.rb | 4 | ||||
-rw-r--r-- | lib/irb/ruby-lex.rb | 2 | ||||
-rw-r--r-- | process.c | 4 | ||||
-rw-r--r-- | rubysig.h | 8 |
6 files changed, 21 insertions, 5 deletions
@@ -51,6 +51,11 @@ Sat Jul 17 18:29:07 2004 Nobuyoshi Nakada <nobu@ruby-lang.org> * parse.y (stmt): not to show same error messages twice. +Sat Jul 17 13:13:32 2004 Yukihiro Matsumoto <matz@ruby-lang.org> + + * lib/irb/ruby-lex.rb (RubyLex::identify_string): %s string do not + process expression interpolation. [ruby-talk:106691] + Sat Jul 17 05:26:27 2004 Dave Thomas <dave@pragprog.com> * lib/rdoc/diagram.rb: Incorporate Micheal Neuman's @@ -10372,13 +10372,16 @@ rb_thread_wait_for(time) curr_thread == curr_thread->next || curr_thread->status == THREAD_TO_KILL) { int n; + int thr_critical = rb_thread_critical; #ifndef linux double d, limit; limit = timeofday()+(double)time.tv_sec+(double)time.tv_usec*1e-6; #endif for (;;) { + rb_thread_critical = Qtrue; TRAP_BEG; n = select(0, 0, 0, 0, &time); + rb_thread_critical = thr_critical; TRAP_END; if (n == 0) return; if (n < 0) { diff --git a/lib/debug.rb b/lib/debug.rb index 0a105abab8..1b12188a76 100644 --- a/lib/debug.rb +++ b/lib/debug.rb @@ -189,10 +189,10 @@ class Context def debug_variable_info(input, binding) case input - when /^\s*g(?:lobal)?$/ + when /^\s*g(?:lobal)?\s*$/ var_list(global_variables, binding) - when /^\s*l(?:ocal)?$/ + when /^\s*l(?:ocal)?\s*$/ var_list(eval("local_variables", binding), binding) when /^\s*i(?:nstance)?\s+/ diff --git a/lib/irb/ruby-lex.rb b/lib/irb/ruby-lex.rb index 6b445a32b9..5a1ede7e3f 100644 --- a/lib/irb/ruby-lex.rb +++ b/lib/irb/ruby-lex.rb @@ -973,7 +973,7 @@ class RubyLex while ch = getc if @quoted == ch and nest == 0 break - elsif @ltype != "'" && @ltype != "]" and ch == "#" + elsif @ltype != "'" && @ltype != "]" && @ltype != ":" and ch == "#" subtype = true elsif ch == '\\' #' read_escape @@ -1315,6 +1315,10 @@ rb_f_exit_bang(argc, argv, obj) return Qnil; /* not reached */ } +#if defined(sun) +#define signal(a,b) sigset(a,b) +#endif + void rb_syswait(pid) int pid; @@ -12,6 +12,7 @@ #ifndef SIG_H #define SIG_H +#include <errno.h> #ifdef _WIN32 typedef LONG rb_atomic_t; @@ -23,10 +24,13 @@ typedef LONG rb_atomic_t; /* Windows doesn't allow interrupt while system calls */ # define TRAP_BEG do {\ + int saved_errno = 0;\ rb_atomic_t trap_immediate = ATOMIC_SET(rb_trap_immediate, 1) # define TRAP_END\ - ATOMIC_SET(rb_trap_immediate, trap_immediate);\ - CHECK_INTS;\ + ATOMIC_SET(rb_trap_immediate, trap_immediate);\ + saved_errno = errno;\ + CHECK_INTS;\ + errno = saved_errno;\ } while (0) # define RUBY_CRITICAL(statements) do {\ rb_w32_enter_critical();\ |