summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--eval.c26
-rw-r--r--misc/ruby-mode.el5
3 files changed, 19 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 0f6364dfd..3a285e5df 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,8 @@ Fri Sep 1 10:36:45 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
Fri Sep 1 10:36:29 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * eval.c (Init_eval): extend room for stack allowance.
+
* eval.c (POP_SCOPE): frees scope too much.
Thu Aug 31 14:28:39 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
diff --git a/eval.c b/eval.c
index be0303e0a..b485cf8ca 100644
--- a/eval.c
+++ b/eval.c
@@ -5652,8 +5652,8 @@ Init_eval()
if (getrlimit(RLIMIT_STACK, &rlim) == 0) {
double space = (double)rlim.rlim_cur*0.2;
- if (space > 256*1024) space = 256*1024;
- STACK_LEVEL_MAX = (rlim.rlim_cur - space) / 4;
+ if (space > 1024*1024) space = 1024*1024;
+ STACK_LEVEL_MAX = (rlim.rlim_cur - space) / sizeof(VALUE);
}
}
#endif
@@ -6025,20 +6025,20 @@ proc_call(proc, args)
ruby_safe_level = safe;
if (state) {
- if (orphan) {/* orphan procedure */
- switch (state) {
- case TAG_BREAK:
- rb_raise(rb_eLocalJumpError, "break from proc-closure");
- break;
- case TAG_RETRY:
- rb_raise(rb_eLocalJumpError, "retry from proc-closure");
- break;
- case TAG_RETURN:
+ switch (state) {
+ case TAG_BREAK:
+ break;
+ case TAG_RETRY:
+ rb_raise(rb_eLocalJumpError, "retry from proc-closure");
+ break;
+ case TAG_RETURN:
+ if (orphan) { /* orphan procedure */
rb_raise(rb_eLocalJumpError, "return from proc-closure");
- break;
}
+ /* fall through */
+ default:
+ JUMP_TAG(state);
}
- JUMP_TAG(state);
}
return result;
}
diff --git a/misc/ruby-mode.el b/misc/ruby-mode.el
index cffd853bb..782d04914 100644
--- a/misc/ruby-mode.el
+++ b/misc/ruby-mode.el
@@ -694,7 +694,10 @@ An end of a defun is found by moving forward from the beginning of one."
(make-local-variable 'font-lock-syntactic-keywords)
(setq font-lock-syntactic-keywords
'(("\\$\\([#\"'`$\\]\\)" 1 (1 . nil))
- ("\\(#\\)[{$@]" 1 (1 . nil))))
+ ("\\(#\\)[{$@]" 1 (1 . nil))
+ ("\\(/\\).*\\(/\\)"
+ (1 (7 . ?'))
+ (2 (7 . ?')))))
(make-local-variable 'font-lock-defaults)
(setq font-lock-defaults '((ruby-font-lock-keywords) nil nil))
(setq font-lock-keywords ruby-font-lock-keywords)))