[#1579] arity bug? — "Christoph" <chr_news@...>
Hi,
5 messages
2003/10/05
[#1588] FreeBSD problem with processes — Laurent Sansonetti <pinux@...>
Hi all,
1 message
2003/10/07
[#1591] Re: Yielding to a block from a proc? — george.marrows@...
> > Is this right? Is this pathological? Is it a bug? Is there
6 messages
2003/10/08
[#1596] PATCH: Revive NextStep, OpenStep, Rhapsody ports — Eric Sunshine <sunshine@...>
Hello,
7 messages
2003/10/09
[#1597] Re: PATCH: Revive NextStep, OpenStep, Rhapsody ports
— matz@... (Yukihiro Matsumoto)
2003/10/09
Hi,
[#1600] CVS access — Sean Russell <ser@...>
Hiya,
8 messages
2003/10/09
[#1611] set_trace_func/Array#fetch error — "Nathaniel Talbott" <nathaniel@...>
I've reduced the error I reported in ruby-talk:84013 to the following code:
17 messages
2003/10/11
[#1612] Re: set_trace_func/Array#fetch error
— ts <decoux@...>
2003/10/11
>>>>> "N" == Nathaniel Talbott <nathaniel@talbott.ws> writes:
[#1616] Re: set_trace_func/Array#fetch error
— "Nathaniel Talbott" <nathaniel@...>
2003/10/11
ts [mailto:decoux@moulon.inra.fr] wrote:
[#1617] Re: set_trace_func/Array#fetch error
— ts <decoux@...>
2003/10/11
>>>>> "N" == Nathaniel Talbott <nathaniel@talbott.ws> writes:
[#1618] Re: set_trace_func/Array#fetch error
— "Nathaniel Talbott" <nathaniel@...>
2003/10/11
ts [mailto:decoux@moulon.inra.fr] wrote:
[#1634] stringy range bug — "Christoph" <chr_news@...>
Hi,
6 messages
2003/10/15
[#1640] SystemStackError in embedding — Sentinel <sentinel27@...>
Hi, I am just now trying to embed ruby into my apprication
8 messages
2003/10/18
Re: set_trace_func/Array#fetch error
From:
ts <decoux@...>
Date:
2003-10-12 16:13:51 UTC
List:
ruby-core #1627
>>>>> "d" == daz <dooby@d10.karoo.co.uk> writes:
d> There's a clumsy way of doing it, too.
d> def tt
d> ret = nil # until the new block var rules arrive.
d> callcc {|cc| ret = cc}
d> # etc
d> ret
d> end
Well not really, here a stupid example
svg% cat b.rb
#!/usr/bin/ruby
def tt
p "enter in tt"
callcc{|cc| return cc}
p "call with current continuation"
end
cc = tt
p "after tt #{cc.inspect}"
cc.call unless cc.nil?
svg%
svg% b.rb
"enter in tt"
"after tt #<Continuation:0x40099f84>"
"call with current continuation"
"after tt nil"
svg%
ruby has "captured" the continuation just after the block, this is why
it's important to return it inside the block.
When you call cc.call the control is transferred at the line
p "call with current continuation"
Guy Decoux