summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-07-22 03:50:33 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-07-22 03:50:33 +0000
commitb74286e423abd50d8e697abd242c16bc683b6357 (patch)
tree891f58582e536897e5a10038bd3c037f271051b5
parent7958edbcdcf11706cff27891687c8d1f92166c8f (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--ChangeLog5
-rw-r--r--eval.c3
-rw-r--r--lib/debug.rb4
-rw-r--r--lib/irb/ruby-lex.rb2
-rw-r--r--process.c4
-rw-r--r--rubysig.h8
6 files changed, 21 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index d5a788f49e..04d670438a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/eval.c b/eval.c
index 783098c385..21678876d2 100644
--- a/eval.c
+++ b/eval.c
@@ -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
diff --git a/process.c b/process.c
index ecf660dddd..0113dc71da 100644
--- a/process.c
+++ b/process.c
@@ -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;
diff --git a/rubysig.h b/rubysig.h
index 6be634787d..8871e3aa03 100644
--- a/rubysig.h
+++ b/rubysig.h
@@ -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();\