[#41134] [Bug:trunk] ext/tk on cygwin — Nobuyoshi Nakada <nobu@...>
なかだです。
[#41138] [Bug #3243] Can't build Ruby after r26506 — Yuki Sonoda <redmine@...>
Bug #3243: Can't build Ruby after r26506
[#41140] [Bug:trunk] the behavior of Tempfile#size was changed — Yusuke ENDOH <mame@...>
なかださん
Hi,
[#41173] [Feature #3251] allow to unlock mutex locked by another thread — Yusuke Endoh <redmine@...>
Feature #3251: allow to unlock mutex locked by another thread
[#41192] Re: [ruby-cvs:34848] Ruby:r27635 (trunk): * cont.c: apply FIBER_USE_NATIVE patch. This patch improve — "U.Nakamura" <usa@...>
こんにちは、なかむら(う)です。
まつもと ゆきひろです
こんにちは、なかむら(う)です。
[#41212] 実装凍結解除とリリース協力のお願い — Yugui <yugui@...>
Yuguiです。
[#41219] [ruby_1_9_2] コンパイルエラー — Takahiro Kambe <taca@...>
ruby_1_9_2ブランチのコンパイルでエラーが起きます。
[#41223] 正規表現オブジェクト中のキャプチャの数 — "KISHIMOTO, Makoto" <ksmakoto@...4u.or.jp>
きしもとです
[#41225] io/console IO#raw error when io is closed in the block — Tanaka Akira <akr@...>
io/console を使ってみたのですが、ちょっとうまく使えません。
[#41247] Regexpの仕様について — Masaya TARUI <tarui@...>
樽家です。
[#41259] Re: [ruby-cvs:34935] Ruby:r27723 (trunk): * ext/psych/parser.c (parse): Return strings encoded as — "U.Nakamura" <usa@...>
こんにちは、なかむら(う)です。
[#41278] [BUG:1.9] BINARY should not be ASCII-compatible — Yugui <yugui@...>
WXVndWkbJEIkRyQ5ISMbKEIKCgo+IBskQiRHISIkKiQqJGAkTSQzJDMkXiRHJE41RE9AJEclKyVQ
普段、あまりM17Nの件に反応しない卜部ですが、
2010/5/11 Urabe Shyouhei <shyouhei@ruby-lang.org>:
[#41286] ruby_1_9_2 on NetBSD 5.1_RC1(+) — Takahiro Kambe <taca@...>
再び、こんばんは。
[#41316] [Bug #3295] make test aborted — Kazuhiro NISHIYAMA <redmine@...>
Bug #3295: make test aborted
チケット #3295 が更新されました。 (by Yusuke Endoh)
[#41329] NoMethodErrorなどのmessage — Masatoshi SEKI <m_seki@...>
咳といいます。
まつもと ゆきひろです
[#41334] [Bug #3307] ext/tk がheader fileの有無を誤判定する — Masaya Tarui <redmine@...>
Bug #3307: ext/tk がheader fileの有無を誤判定する
[#41348] [Bug #3316] Kernel#caller returns nil as well — Nobuhiro IMAI <redmine@...>
Bug #3316: Kernel#caller returns nil as well
遠藤です。
[#41350] [Bug #3318] net/imap/test_imap.rb reports an error on Windows — Usaku NAKAMURA <redmine@...>
Bug #3318: net/imap/test_imap.rb reports an error on Windows
[#41353] [Bug #3037] testrb の動作が1.8.7 の testrb と違いすぎる — Yusuke Endoh <redmine@...>
チケット #3037 が更新されました。 (by Yusuke Endoh)
2010年5月19日21:04 Yusuke Endoh <redmine@ruby-lang.org>:
[#41377] [Bug #3326] ruby_1_8がAIXでコンパイルできません。 — Yutaka Kanemoto <redmine@...>
Bug #3326: ruby_1_8がAIXでコンパイルできません。
[#41382] [Feature #3328] Kernel#p outputs as default_internal encoding, and so on — Masaya Tarui <redmine@...>
Feature #3328: Kernel#p outputs as default_internal encoding, and so on
[#41407] [Bug #3339] win32ole test failure — Usaku NAKAMURA <redmine@...>
Bug #3339: win32ole test failure
助田です。
こんにちは、なかむら(う)です。
助田です。
こんにちは、なかむら(う)です。
志村と申します
[#41423] [Bug #3345] webrick test failure on Windows(?) — Usaku NAKAMURA <redmine@...>
Bug #3345: webrick test failure on Windows(?)
[#41430] [bug:trunk] rubyspec: Kernel.spawn redirects both STDERR and STDOUT to the given name ERROR — Yusuke ENDOH <mame@...>
遠藤です。
[#41452] [Bug #3360] rdoc fails when including BOM — white leaf <redmine@...>
Bug #3360: rdoc fails when including BOM
チケット #3360 が更新されました。 (by Nobuyoshi Nakada)
[#41481] [Bug #3370] test failure of drb — Usaku NAKAMURA <redmine@...>
Bug #3370: test failure of drb
[ruby-dev:41375] Re: [Bug #3316] Kernel#caller returns nil as well
遠藤です。
2010年5月20日4:47 Nobuhiro IMAI <nov@yo.rim.or.jp>:
> が、これだと、caller(0) で返る配列のサイズを越える数を引数として渡して
> も空配列が返るようになってしまっているようです。
ぐああ、問題を誤解していました。nil が帰ることがあるのは元からなんですね。
以下のパッチで再挑戦します。それから頂いたパッチは取り込んでおきます。
diff --git a/vm.c b/vm.c
index 084c8c8..ac1d8ed 100644
--- a/vm.c
+++ b/vm.c
@@ -706,19 +706,20 @@ rb_vm_get_sourceline(const rb_control_frame_t *cfp)
}
static int
-vm_backtrace_each(rb_thread_t *th, int lev, rb_backtrace_iter_func
*iter, void *arg)
+vm_backtrace_each(rb_thread_t *th, int lev, void (*init)(void *),
rb_backtrace_iter_func *iter, void *arg)
{
const rb_control_frame_t *limit_cfp = th->cfp;
const rb_control_frame_t *cfp = (void *)(th->stack + th->stack_size);
- VALUE file = Qnil;
+ VALUE file = Qnil, *aryp = arg;
int line_no = 0;
cfp -= 2;
while (lev-- >= 0) {
- if (++limit_cfp >= cfp) {
+ if (++limit_cfp > cfp) {
return FALSE;
}
}
+ if (init) (*init)(arg);
limit_cfp = RUBY_VM_NEXT_CONTROL_FRAME(limit_cfp);
if (th->vm->progname) file = th->vm->progname;
while (cfp > limit_cfp) {
@@ -747,15 +748,19 @@ vm_backtrace_each(rb_thread_t *th, int lev,
rb_backtrace_iter_func *iter, void *
return TRUE;
}
+static void
+vm_backtrace_alloc(void *arg)
+{
+ VALUE *aryp = arg;
+ *aryp = rb_ary_new();
+}
+
static int
vm_backtrace_push(void *arg, VALUE file, int line_no, VALUE name)
{
VALUE *aryp = arg;
VALUE bt;
- if (!*aryp) {
- *aryp = rb_ary_new();
- }
bt = rb_enc_sprintf(rb_enc_compatible(file, name), "%s:%d:in `%s'",
RSTRING_PTR(file), line_no, RSTRING_PTR(name));
rb_ary_push(*aryp, bt);
@@ -770,7 +775,7 @@ vm_backtrace(rb_thread_t *th, int lev)
if (lev < 0) {
ary = rb_ary_new();
}
- vm_backtrace_each(th, lev, vm_backtrace_push, &ary);
+ vm_backtrace_each(th, lev, vm_backtrace_alloc, vm_backtrace_push, &ary);
if (!ary) return Qnil;
return rb_ary_reverse(ary);
}
diff --git a/vm_eval.c b/vm_eval.c
index d1e6352..b854efc 100644
--- a/vm_eval.c
+++ b/vm_eval.c
@@ -16,7 +16,7 @@ static inline VALUE rb_vm_set_finish_env(rb_thread_t * th);
static inline VALUE vm_yield_with_cref(rb_thread_t *th, int argc,
const VALUE *argv, const NODE *cref);
static inline VALUE vm_yield(rb_thread_t *th, int argc, const VALUE *argv);
static inline VALUE vm_backtrace(rb_thread_t *th, int lev);
-static int vm_backtrace_each(rb_thread_t *th, int lev,
rb_backtrace_iter_func *iter, void *arg);
+static int vm_backtrace_each(rb_thread_t *th, int lev, void
(*init)(void *), rb_backtrace_iter_func *iter, void *arg);
static NODE *vm_cref_push(rb_thread_t *th, VALUE klass, int noex,
rb_block_t *blockptr);
static VALUE vm_exec(rb_thread_t *th);
static void vm_set_eval_stack(rb_thread_t * th, VALUE iseqval, const
NODE *cref);
@@ -1574,9 +1574,7 @@ rb_f_caller(int argc, VALUE *argv)
if (lev < 0)
rb_raise(rb_eArgError, "negative level (%d)", lev);
- ary = vm_backtrace(GET_THREAD(), lev);
- if (NIL_P(ary)) ary = rb_ary_new();
- return ary;
+ return vm_backtrace(GET_THREAD(), lev);
}
static int
@@ -1598,7 +1596,7 @@ print_backtrace(void *arg, VALUE file, int line,
VALUE method)
void
rb_backtrace(void)
{
- vm_backtrace_each(GET_THREAD(), -1, print_backtrace, stderr);
+ vm_backtrace_each(GET_THREAD(), -1, NULL, print_backtrace, stderr);
}
VALUE
@@ -1629,7 +1627,7 @@ rb_thread_backtrace(VALUE thval)
int
rb_backtrace_each(rb_backtrace_iter_func *iter, void *arg)
{
- return vm_backtrace_each(GET_THREAD(), -1, iter, arg);
+ return vm_backtrace_each(GET_THREAD(), -1, NULL, iter, arg);
}
/*
--
Yusuke Endoh <mame@tsg.ne.jp>