# P()#=>[]

e\$B>>Hx\$H\$\$\$\$\$^\$9!#e(B
1.9e\$B\$G%a%=%C%Ie(Bpe\$B\$NJV\$jCM\$,\$=\$N0z?t\$NCM\$K\$J\$j\$^\$7\$?\$,!"e(B

rer = p
p rer # => []

rer = p()
p rer # => []

rer = p(()) # => nil
p rer # => nil

e\$B0z?t\$J\$7\$N;~e(B [ ] e\$B\$rJV\$9\$N\$O0U?^\$7\$?5sF0\$G\$7\$g\$&\$+!)e(B
nil e\$B\$+\$J\$!\$H;W\$C\$F\$\$\$?\$N\$G\$9\$,!#e(B

e\$B4{=Pe(Bore\$B=\$@5:Q\$\$G\$7\$?\$i\$9\$\$^\$;\$s!#e(B
ruby 1.9.0 (2007-07-09 patchlevel 0) [i386-mswin32]

e\$B\$J\$+\$@\$G\$9!#e(B

At Mon, 23 Jul 2007 19:59:17 +0900,
eklerni wrote in [ruby-dev:31285]:

e\$B0z?t\$J\$7\$N;~e(B [ ] e\$B\$rJV\$9\$N\$O0U?^\$7\$?5sF0\$G\$7\$g\$&\$+!)e(B
nil e\$B\$+\$J\$!\$H;W\$C\$F\$\$\$?\$N\$G\$9\$,!#e(B

rete\$B\$re(BQnile\$B\$G=i4|2=\$7\$F\$\$\$k\$3\$H\$+\$i\$9\$k\$H!"e(Bnile\$B\$K\$9\$k\$D\$b\$j\$@\$C\$?e(B
e\$B\$N\$G\$O\$J\$\$\$+\$H;W\$\$\$^\$9!#e(B

# Index: io.c

— io.c (revision 12839)
+++ io.c (working copy)
@@ -3992,5 +3992,5 @@ rb_f_p(int argc, VALUE *argv, VALUE self
ret = argv[0];
}

• else {
• else if (argc > 1) {
ret = rb_ary_new4(argc, argv);
}

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

In message “Re: [ruby-dev:31288] Re: p()#=>[]”
on Tue, 24 Jul 2007 03:00:53 +0900, Nobuyoshi N.
[email protected] writes:

|At Mon, 23 Jul 2007 19:59:17 +0900,
|eklerni wrote in [ruby-d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B\$l\$F\$\$\$^\$9!#e(B

rer = p(:some) # => :some
p rer # => [:some]

e\$BD4\$Y\$F\$\$\$?\$@\$1\$?\$i9,\$\$\$G\$9!#e(B

ruby 1.9.0 (2007-08-18 patchlevel 0) [i386-mswin32_80]

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

In message “Re: [ruby-dev:31606] Re: p()#=>[]”
on Wed, 22 Aug 2007 23:18:55 +0900, eklerni
[email protected] writes:

|e\$B8=:\$N5sF0\$r\$\$F\$_\$^\$7\$?\$i!"e(B
|e\$B0z?t\$J\$7\$N;~\$NI=<(\$9\$kCM\$HJV\$9CM\$,e(Bmain(self)e\$B\$K\$J\$C\$F\$\$\$^\$9!#e(B

e\$B;d\$N\$H\$3\$m\$HF0\$-\$,0c\$&\$h\$&\$G\$9!#e(B

|rer = p # => main
|p rer # => main

|rer = p # => main
|p rer # => main

% ruby -ve ‘p(p())’
ruby 1.9.0 (2007-08-24 patchlevel 0) [i686-linux]
nil

|e\$B\$^\$?!“0z?t\$”\$j\$N>l9g!"0z?t\$rI>2A\$7\$?CM\$G\$O\$J\$/\$=\$l\$rG[Ns2=\$7\$?\$b\$N\$,JV\$5e(B
|e\$B\$l\$F\$\$\$^\$9!#e(B
|
|rer = p(:some) # => :some
|p rer # => [:some]

% ruby -ve ‘p(p(:some))’
ruby 1.9.0 (2007-08-24 patchlevel 0) [i686-linux]
:some
:some

|e\$BD4\$Y\$F\$\$\$?\$@\$1\$?\$i9,\$\$\$G\$9!#e(B
|
|ruby 1.9.0 (2007-08-18 patchlevel 0) [i386-mswin32_80]

e\$B\$^\$:!"\$*<j85\$Ne(BRubye\$B\$r?7\$7\$/\$7\$F\$_\$k\$N\$O\$I\$&\$G\$7\$g\$&!#e(B

From:eklerni

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

e\$B\$^\$:!"\$*<j85\$Ne(BRubye\$B\$r?7\$7\$/\$7\$F\$_\$k\$N\$O\$I\$&\$G\$7\$g\$&!#e(B

e\$B:G?7HG\$G\$OLdBj\$"\$j\$^\$;\$s\$G\$7\$?!#e(B

e\$BJs9pA0\$K?7\$7\$/\$7\$?\$D\$b\$j\$G\$J\$C\$F\$J\$+\$C\$?\$h\$&\$G\$9!#\$*<j?t\$+\$1\$F?=\$7Lu\$J\$\$!#e(B