зеркало из https://github.com/github/ruby.git
* eval.c (rb_thread_start_0): forget to free some memory chunks.
[ruby-core:03611] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
6d25a97ca0
Коммит
7c04db1d3c
|
@ -5,6 +5,9 @@ Fri Oct 29 11:35:04 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
|||
|
||||
Fri Oct 29 10:00:30 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* eval.c (rb_thread_start_0): forget to free some memory chunks.
|
||||
[ruby-core:03611]
|
||||
|
||||
* eval.c (ruby_cleanup): ruby_finalize_1 may cause exception,
|
||||
should be wrapped by PUSH_TAG/POP_TAG(). [ruby-dev:24627]
|
||||
|
||||
|
|
4
eval.c
4
eval.c
|
@ -11473,6 +11473,10 @@ rb_thread_start_0(fn, arg, th)
|
|||
if (th == main_thread) ruby_stop(state);
|
||||
rb_thread_remove(th);
|
||||
|
||||
if (saved_block) {
|
||||
blk_free(saved_block);
|
||||
}
|
||||
|
||||
if (state && status != THREAD_TO_KILL && !NIL_P(ruby_errinfo)) {
|
||||
th->flags |= THREAD_RAISED;
|
||||
if (state == TAG_FATAL) {
|
||||
|
|
|
@ -521,10 +521,23 @@ The variable ruby-indent-level controls the amount of indentation.
|
|||
(looking-at "<<\\(-\\)?\\(\\([\"'`]\\)\\([^\n]+?\\)\\3\\|\\sw+\\)"))
|
||||
(setq re (regexp-quote (or (match-string 4) (match-string 2))))
|
||||
(if (match-beginning 1) (setq re (concat "\\s *" re)))
|
||||
(if (re-search-forward (concat "^" re "$") end 'move)
|
||||
(forward-line 1)
|
||||
(setq in-string (match-end 0))
|
||||
(goto-char end)))
|
||||
(let* ((id-end (goto-char (match-end 0)))
|
||||
(line-end-position (save-excursion (end-of-line) (point)))
|
||||
(state (list in-string nest depth pcol indent)))
|
||||
;; parse the rest of the line
|
||||
(while (and (> line-end-position (point))
|
||||
(setq state (apply 'ruby-parse-partial
|
||||
line-end-position state))))
|
||||
(setq in-string (car state)
|
||||
nest (nth 1 state)
|
||||
depth (nth 2 state)
|
||||
pcol (nth 3 state)
|
||||
indent (nth 4 state))
|
||||
;; skip heredoc section
|
||||
(if (re-search-forward (concat "^" re "$") end 'move)
|
||||
(forward-line 1)
|
||||
(setq in-string id-end)
|
||||
(goto-char end))))
|
||||
(t
|
||||
(goto-char pnt))))
|
||||
((looking-at "^__END__$")
|
||||
|
|
Загрузка…
Ссылка в новой задаче