Circular require warning is emitted to both stdout and stderr

e$B1sF#$G$9!#e(B

$ ./ruby -w foo.rb
/home/mame/work/ruby/foo.rb:1: warning: loading in progress, circular
require considered harmful - /home/mame/work/ruby/bar.rb
from foo.rb:1:in <main>' from foo.rb:1:inrequire’
from /home/mame/work/ruby/bar.rb:1:in <top (required)>' from /home/mame/work/ruby/bar.rb:1:inrequire’
from /home/mame/work/ruby/foo.rb:1:in <top (required)>' from /home/mame/work/ruby/foo.rb:1:inrequire’

e$B>e5-$Ne(B “circular require considered harmful”
e$B$NNc30$G$9$,!"0l9TL$Oe(B
stderr e$B$K!"Fs9TL\0J9_$Oe(B stdout e$B$K=P$F$$$k$h$&$G$9!#e(B

$ ./ruby -w foo.rb > /dev/null
/home/mame/work/ruby/foo.rb:1: warning: loading in progress, circular
require considered harmful - /home/mame/work/ruby/bar.rb

$ ./ruby -w foo.rb 2> /dev/null
from foo.rb:1:in <main>' from foo.rb:1:inrequire’
from /home/mame/work/ruby/bar.rb:1:in <top (required)>' from /home/mame/work/ruby/bar.rb:1:inrequire’
from /home/mame/work/ruby/foo.rb:1:in <top (required)>' from /home/mame/work/ruby/foo.rb:1:inrequire’

e$BL5BL$K$d$d$3$7$$$H;W$&$N$G!“H?BP$,$J$1$l$P0J2<$N%Q%C%A$r$”$F$h$&$He(B
e$B;W$$$^$9!#e(B

diff --git a/vm_eval.c b/vm_eval.c
index 762453e…ada783d 100644
— a/vm_eval.c
+++ b/vm_eval.c
@@ -1577,7 +1577,7 @@ print_backtrace(void *arg, VALUE file, int line,
VALUE method)
void
rb_backtrace(void)
{

  • vm_backtrace_each(GET_THREAD(), -1, print_backtrace, stdout);
  • vm_backtrace_each(GET_THREAD(), -1, print_backtrace, stderr);
    }

VALUE

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:40147] circular require warning is emitted to
both stdout and stderr”
on Mon, 25 Jan 2010 22:54:46 +0900, Yusuke ENDOH [email protected]
writes:

|e$B>e5-$Ne(B “circular require considered harmful” e$B$NNc30$G$9$,!"0l9TL$Oe(B
|stderr e$B$K!"Fs9TL\0J9_$Oe(B stdout e$B$K=P$F$$$k$h$&$G$9!#e(B

|e$BL5BL$K$d$d$3$7$$$H;W$&$N$G!“H?BP$,$J$1$l$P0J2<$N%Q%C%A$r$”$F$h$&$He(B
|e$B;W$$$^$9!#e(B

e$B%3%_%C%H$7$F$/[email protected]$5$$e(B

e$B1sF#$G$9!#e(B

2010e$BG/e(B1e$B7ne(B27e$BF|e(B18:38 Yukihiro M.
[email protected]:

|e$B>e5-$Ne(B “circular require considered harmful” e$B$NNc30$G$9$,!"0l9TL$Oe(B
|stderr e$B$K!"Fs9TL\0J9_$Oe(B stdout e$B$K=P$F$$$k$h$&$G$9!#e(B

|e$BL5BL$K$d$d$3$7$$$H;W$&$N$G!“H?BP$,$J$1$l$P0J2<$N%Q%C%A$r$”$F$h$&$He(B
|e$B;W$$$^$9!#e(B

e$B%3%_%C%H$7$F$/[email protected]$5$$e(B

e$B%3%_%C%H$7$^$7$?e(B (r26443) e$B!#e(B

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs