ruby-dev (Japanese) list archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-dev:47453] RUBY_DEBUG and GC.stress
@ 2013-06-19 14:18 Kazuhiro NISHIYAMA
  0 siblings, 0 replies; only message in thread
From: Kazuhiro NISHIYAMA @ 2013-06-19 14:18 UTC (permalink / raw
  To: ruby developers list

西山和広です。

現在の trunk を --enable-debug-env 付きで configure して
環境変数に RUBY_DEBUG=gc_stress を指定して起動すると
GC.stress に Fixnum の 0 が設定されます。

% RUBY_DEBUG=gc_stress ruby -v --disable=gems -e 'p GC.stress'
ruby 2.1.0dev (2013-06-19 trunk 41429) [x86_64-linux]
0


GC.stress が Fixnum かどうかを見ている部分が
garbage_collect_body しかなくて、 GC.stress = true と
GC.stress = 0 が同じ挙動になっているように見えますが、
意図的でしょうか?

それから Fixnum でいろいろフラグを設定出来るのなら
RUBY_DEBUG でもオンかオフかだけではなく、数値を
指定出来るようにすると便利なのではないでしょうか。


-- 
|ZnZ(ゼット エヌ ゼット)
|西山和広(Kazuhiro NISHIYAMA)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-06-19 14:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-19 14:18 [ruby-dev:47453] RUBY_DEBUG and GC.stress Kazuhiro NISHIYAMA

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).