[#15701] Ruby 1.9.0-1 snapshot released — Yukihiro Matsumoto <matz@...>
Hi,
[#15704] Proc#curry doesn't work on func which produces func — Lin Jen-Shin <godfat@...>
Proc#curry doesn't work on function which produces function,
Hi,
>>>>> "Y" == Yusuke ENDOH <mame@tsg.ne.jp> writes:
[#15707] Schedule for the 1.8.7 release — "Akinori MUSHA" <knu@...>
Hi, developers,
On Sat, Mar 01, 2008 at 08:58:00PM +0900, Akinori MUSHA wrote:
Hi,
At Fri, 21 Mar 2008 23:16:54 +0900,
At Mon, 24 Mar 2008 21:39:45 +0900,
[#15709] capitalize and downcase — Trans <transfire@...>
I've always wondered why String#capitalize downcases the whole string
[#15713] Ruby String hash key overflow when converting to Fixnum. — "Chiyuan Zhang" <pluskid@...>
Hi, all! I've opened a issue at rubyforge:
[#15728] Question on build process - skipping unsupported extensions — Daniel Berger <djberg96@...>
Hi,
[#15740] Copy-on-write friendly garbage collector — Hongli Lai <hongli@...99.net>
Hi.
Hi,
Yukihiro Matsumoto wrote:
Yukihiro Matsumoto wrote:
Hi.
Hongli Lai wrote:
Hi.
Hi,
I believe I managed to close the performance gap to only 6% slower than
Daniel DeLorme wrote:
[#15746] Am I misinterpreting the new keyword arguments to IO.foreach and friends? — Dave Thomas <dave@...>
I was expecting this to pass lines to the block:
[#15756] embedding Ruby 1.9.0 inside pthread — "Suraj Kurapati" <sunaku@...>
Hello,
Hi,
Hi,
Yukihiro Matsumoto wrote:
Suraj N. Kurapati wrote:
Hi,
Nobuyoshi Nakada wrote:
Suraj N. Kurapati wrote:
Hongli Lai wrote:
[#15775] next(n), succ(n) ? — Trans <transfire@...>
Can anyone see any reason against adding an optional parameter to
[#15778] Named captures and regular captures — Dave Thomas <dave@...>
It seems that once you have a named capture in a regular expression,
[#15783] Adding startup and shutdown to Test::Unit — Daniel Berger <Daniel.Berger@...>
Hi all,
Daniel Berger wrote:
On Wed, Mar 05, 2008 at 07:52:40AM +0900, Daniel Berger wrote:
[#15835] TimeoutError in core, timeouts for ConditionVariable#wait — MenTaLguY <mental@...>
I've been reworking JRuby's stdlib to improve performance and fix
On Sun, 2008-03-09 at 12:13 +0900, MenTaLguY wrote:
[#15837] Correct procedure for patch review? — Hongli Lai <hongli@...99.net>
Hi.
[#15855] Ruby 1.8.6 trace return line numbers wrong — "Rocky Bernstein" <rocky.bernstein@...>
Consider this program:
[#15860] Webrick directory traversal exploit on UNIX — Jos Backus <jos@...>
DSecRG Advisory #DSECRG-08-026 aka -018 describes a remote directory traversal
[#15871] Sparc architecture optimizations — Thomas Enebo <Thomas.Enebo@...>
Someone at Sun has been looking at Ruby on Sparc:
Thomas Enebo wrote:
Hello Ruby-core,
Hi,
Yukihiro Matsumoto wrote:
Prashant Srinivasan wrote:
[#15880] Ruby 1.8.6 binding value after "if" expression evaluation — "Rocky Bernstein" <rocky.bernstein@...>
Here's another trace hook weirdness that I've encountered.
Hello,
Thanks. The output you report matches what I get in 1.8.6 and suggests where
I think I've found why this is happening. The trace hook for NODE_IF is
[#15907] Range#member? semantics seem wrong — Dave Thomas <dave@...>
Range#member? has been changed so that it the start and end of the
[#15909] RARRAY_PTR — "Laurent Sansonetti" <laurent.sansonetti@...>
Hi,
[#15917] Ruby 1.9 (trunk) crashes when running RubyGems and Rake — Hongli Lai <hongli@...99.net>
Ruby 1.9 (trunk) seems to crash when running the supplied RubyGems and Rake:
Hi,
Nobuyoshi Nakada wrote:
On Mon, Mar 17, 2008 at 06:53:19PM +0900, Hongli Lai wrote:
[#15927] how to create a block with a block parameter in C? — Paul Brannan <pbrannan@...>
This works in Ruby (1.9):
>>>>> "P" == Paul Brannan <pbrannan@atdesk.com> writes:
[#15933] complex and rational — Dave Thomas <dave@...>
Before I start doing the documentation for the PickAxe, could I just
[#15936] Are Depreciated Methods "add_final" & "remove_final" supposed to ACTUALLY WORK? — Charles Thornton <ceo@...>
In Working on IRHG Docs for GC the following
>>>>> "C" == Charles Thornton <ceo@hawthorne-press.com> writes:
ts wrote:
[#15938] Questions on Enumerator#skip_first and Enumerable#first — "Artem Voroztsov" <artem.voroztsov@...>
I asked in ruby-talk, but did not get answer.
On Mar 18, 2008, at 6:20 AM, Artem Voroztsov wrote:
[#15975] Bugs in REXML — "Federico Builes" <federico.builes@...>
Hi,
On Mar 21, 2008, at 17:35, Federico Builes wrote:
[#15980] 1.8.6 memory leak? — "Stephen Sykes" <sdsykes@...>
Hi,
[#15983] Changing the algorithm of String#* — apeiros <apeiros@...>
Hi there
[#15990] Recent changes in Range#step behavior — "Vladimir Sizikov" <vsizikov@...>
Hi,
Hi Dave,
Hi Dave,
Hi,
Hi,
Hi,
On Wed, Mar 26, 2008 at 7:01 PM, Dave Thomas <dave@pragprog.com> wrote:
Dave Thomas wrote:
Dave Thomas wrote:
Dave Thomas wrote:
Dave,
This is all a semantic problem. Different people have different
[#16011] New ERb mode — Marc Haisenko <haisenko@...>
Hi folks,
On Tuesday 25 March 2008, Marc Haisenko wrote:
ERb already does this:
On Tuesday 25 March 2008, Jason Roelofs wrote:
On Tue, Mar 25, 2008 at 11:39 AM, Marc Haisenko <haisenko@comdasys.com> wro=
On Tuesday 25 March 2008, Jason Roelofs wrote:
[#16023] some Enumerable methods slower in 1.9 on OS X after revision 15124 — Chris Shea <cmshea@...>
All,
Hi,
Hi,
On Thu, Mar 27, 2008 at 02:26:51PM +0900, Nobuyoshi Nakada wrote:
Hi,
Nobuyoshi Nakada wrote:
Hi,
[#16057] About the license of gserver.rb being "freeware"? — "XiaoLiang Liu" <liuxlsh@...>
Hello everyone,
[#16088] command_call in parse.y — Adrian Thurston <thurston@...>
Hi,
Re: Ruby 1.8.6 binding value after "if" expression evaluation
Actually, probably the sunk code isn't as precise because we probably want
to run the hook on node before it gets reassigned. Also, I wonder if it
wouldn't be more precise be run the hook using node->nd_cond instead of node
as it was originally done.
Okay, think I've beat this horse dead.
On Thu, Mar 13, 2008 at 10:45 PM, Rocky Bernstein <rocky.bernstein@gmail.com>
wrote:
> A slightly shorter patch by sinking common code:
>
> Index: eval.c
> ===================================================================
> --- eval.c (revision 15769)
> +++ eval.c (working copy)
> @@ -3038,15 +3038,15 @@
> RETURN(Qfalse);
>
> case NODE_IF:
> - EXEC_EVENT_HOOK(RUBY_EVENT_LINE, node, self,
> - ruby_frame->last_func,
> - ruby_frame->last_class);
> if (RTEST(rb_eval(self, node->nd_cond))) {
> node = node->nd_body;
> }
> else {
> node = node->nd_else;
> }
> + EXEC_EVENT_HOOK(RUBY_EVENT_LINE, node, self,
> + ruby_frame->last_func,
> + ruby_frame->last_class);
> goto again;
>
> case NODE_WHEN:
>
>
> On Thu, Mar 13, 2008 at 10:13 PM, Rocky Bernstein <
> rocky.bernstein@gmail.com> wrote:
>
> > I think I've found why this is happening. The trace hook for NODE_IF is
> > getting called a before the expression evaluation occurs when it should be
> > called afterwards. Attached is a patch. I will also update #18722<http://rubyforge.org/tracker/index.php?func=detail&aid=18722&group_id=426&atid=22040>with this information.
> >
> > Thanks.
> >
> > On Thu, Mar 13, 2008 at 2:32 PM, Rocky Bernstein <
> > rocky.bernstein@gmail.com> wrote:
> >
> > > Thanks. The output you report matches what I get in 1.8.6 and suggests
> > > where to start looking for a bug. I'm not sure this is strictly related to
> > > blocks. In particular try this:
> > >
> > > x = 6.2*1 if
> > > x=6.1
> > >
> > > The line break after the "if" is intentional since it more clearly
> > > shows which part gets run when. In this code,
> > > first there are two stops on the x=6.1 presumably before and after the
> > > assignment. But by the time of the c-call to multiply 6.2*1, the value
> > > of x is 6.1. It is like some sort of register flushing that is going
> > > before the c-call, but again that's pure guess.
> > >
> > > On Thu, Mar 13, 2008 at 12:59 PM, Yemi I. D. Bedu <yemi@weldfast.com>
> > > wrote:
> > >
> > > > Hello,
> > > >
> > > > I tried this and it has to do with implicit / explicit block. Also
> > > > I expanded example:
> > > >
> > > >
> > > >
> > > > p RUBY_VERSION
> > > >
> > > >
> > > >
> > > > def trace_func(event, file, line, id, binding, klass, *)
> > > >
> > > > printf("%s:%d (%s) x=%s\n", file, line, event, eval("x", binding))
> > > >
> > > > end
> > > >
> > > >
> > > >
> > > > set_trace_func method(:trace_func).to_proc
> > > >
> > > >
> > > >
> > > > x=2
> > > >
> > > > (x=3.2) if x=3.1
> > > >
> > > > begin x=4.2 end if x=4.1
> > > >
> > > > x=5.2 if x=5.1
> > > >
> > > > x=6.2*1 if x=6.1*1
> > > >
> > > > if x=7.1 then x=7.2 end
> > > >
> > > > x=8
> > > >
> > > > x=9
> > > >
> > > >
> > > >
> > > > My Results were:
> > > >
> > > >
> > > >
> > > > "1.8.2"
> > > >
> > > >
> > > >
> > > > tt.rb:9 (line) x=
> > > >
> > > >
> > > >
> > > > tt.rb:10 (line) x=2
> > > >
> > > > tt.rb:10 (line) x=2
> > > >
> > > > tt.rb:10 (line) x=3.1
> > > >
> > > >
> > > >
> > > > tt.rb:11 (line) x=3.2
> > > >
> > > > tt.rb:11 (line) x=3.2
> > > >
> > > > tt.rb:11 (line) x=4.1
> > > >
> > > >
> > > >
> > > > tt.rb:12 (line) x=4.2
> > > >
> > > > tt.rb:12 (line) x=4.2
> > > >
> > > >
> > > >
> > > > tt.rb:13 (line) x=5.2
> > > >
> > > > tt.rb:13 (line) x=5.2
> > > >
> > > > tt.rb:13 (c-call) x=5.2
> > > >
> > > > tt.rb:13 (c-return) x=5.2
> > > >
> > > > tt.rb:13 (c-call) x=6.1
> > > >
> > > > tt.rb:13 (c-return) x=6.1
> > > >
> > > >
> > > >
> > > > tt.rb:14 (line) x=6.2
> > > >
> > > > tt.rb:14 (line) x=6.2
> > > >
> > > > tt.rb:14 (line) x=7.1
> > > >
> > > >
> > > >
> > > > tt.rb:15 (line) x=7.2
> > > >
> > > >
> > > >
> > > > tt.rb:16 (line) x=8
> > > >
> > > >
> > > >
> > > > You would need to either have parens, explicit block or use the
> > > > other if form to get that last firing from the trace. It seems to token out
> > > > each expression unit on a line and then call eval to get the previous lines
> > > > value. I don't know if you can confirm this on your 1.8.6 install.
> > > > The lines with the multiply do func calls so they eval before going into the
> > > > new env and when the come back. You might want to have a more complex
> > > > expression execute like a list comprehension or a map. Good day.
> > > >
> > > > Yemi Bedu
> > > >
> > > > P&R Fasteners, Inc.
> > > > P&R Castings, LLC.
> > > > 325 Pierce St
> > > > Somerset, NJ 08873
> > > > (T) 732-302-3600
> > > > (F) 732-302-3636
> > > > ------------------------------
> > > >
> > > > *From:* Rocky Bernstein [mailto:rocky.bernstein@gmail.com]
> > > > *Sent:* Wednesday, March 12, 2008 11:21 PM
> > > > *To:* ruby-core@ruby-lang.org
> > > > *Subject:* Ruby 1.8.6 binding value after "if" expression evaluation
> > > >
> > > >
> > > >
> > > > Here's another trace hook weirdness that I've encountered.
> > > >
> > > > Consider this program and its output:
> > > >
> > > > def trace_func(event, file, line, id, binding, klass, *)
> > > > printf("%s:%d (%s) x=%s\n", file, line, event, eval("x", binding))
> > > > end
> > > > set_trace_func method(:trace_func).to_proc
> > > > x=5
> > > > x=6.2 if x=6.1
> > > > x=7
> > > >
> > > >
> > > > $ ruby bug2.rb
> > > > bug2.rb:6: warning: found = in conditional, should be ==
> > > > bug2.rb:5 (line) x=
> > > > bug2.rb:6 (line) x=5
> > > > bug2.rb:6 (line) x=5
> > > > bug2.rb:7 (line) x=6.2
> > > >
> > > > Why does x appear to have value 5 the second time on line 7 rather
> > > > than 6.1?
> > > >
> > > > Looking at eval.c what's supposed to happen (I think) is that the
> > > > trace hook is called before the expression (x=6.1) is evaluated and
> > > > then called before the assignment "x=6.2" in which case it should
> > > > have value 6.1, not 5.
> > > >
> > > > Can anyone explain why this happens?
> > > >
> > > > Again this is ruby 1.8.6
> > > >
> > >
> > >
> >
>