[#1207] warning in ruby extension eats memory — Eugene Scripnik <Eugene.Scripnik@...>
This message was posted to ruby-talk, but I didn't get responce from
>>>>> "E" == Eugene Scripnik <Eugene.Scripnik@itgrp.net> writes:
ts wrote:
>>>>> "E" == Eugene Scripnik <Eugene.Scripnik@itgrp.net> writes:
ts wrote:
>>>>> "E" == Eugene Scripnik <Eugene.Scripnik@itgrp.net> writes:
ts wrote:
>>>>> "E" == Eugene Scripnik <Eugene.Scripnik@itgrp.net> writes:
ts wrote:
>>>>> "E" == Eugene Scripnik <Eugene.Scripnik@itgrp.net> writes:
Hi,
[#1229] stack problem — Mathieu Bouchard <matju@...>
On Sat, Jul 12, 2003 at 01:59:53PM +0900, Mathieu Bouchard wrote:
On Tue, Jul 15, 2003 at 01:26:43AM +0900, Mathieu Bouchard wrote:
Hi,
[#1237] FTP.new with block — Gavin Sinclair <gsinclair@...>
Hi,
>>>>> "G" == Gavin Sinclair <gsinclair@soyabean.com.au> writes:
Hi,
Mathieu Bouchard wrote:
On Sun, Jul 20, 2003 at 03:06:13AM +0900, Dave Thomas wrote:
>>>>> "R" == Richard Zidlicky <rz@linux-m68k.org> writes:
On Sun, Jul 20, 2003 at 06:51:03PM +0900, ts wrote:
>>>>> "R" == Richard Zidlicky <rz@linux-m68k.org> writes:
On Mon, Jul 21, 2003 at 09:59:19PM +0900, ts wrote:
[#1249] File.write(path, data)? — Gavin Sinclair <gsinclair@...>
I am glad to see File.read(path) in Ruby 1.8. But what about
[#1256] testunit, exit status and at_exit — Dave Thomas <dave@...>
I'd really like TestUnit to be able to return an exit status when I run
-----BEGIN PGP SIGNED MESSAGE-----
Sean E. Russell [mailto:ser@germane-software.com] wrote:
Hi,
[#1257] Add have_defined() and rework have_struct_member() — Michal Rokos <m.rokos@...>
Hello,
[#1297] Fix for Bug 1058 — Markus Walser <walser@...>
Hi,
Hi,
On Friday 25 July 2003 10:58, Yukihiro Matsumoto wrote:
Hi,
On Friday 25 July 2003 11:46, Yukihiro Matsumoto wrote:
I tried to figure out what's wrong. So far I havn't a solution:
Hello,
> Check the value of klass by
Hi,
[#1309] exceptions and such — Mathieu Bouchard <matju@...>
[#1310] adding NodeDump and ii — nobu.nokada@...
Hi,
>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:
Re: [Patch] FTP.new with block
On Sun, Jul 20, 2003 at 06:51:03PM +0900, ts wrote:
> >>>>> "R" == Richard Zidlicky <rz@linux-m68k.org> writes:
>
> R> something more systematic is needed. So far only 2 widely used
> R> classes appear to evaluate blocks passed to new: Proc and Tk.
>
> svg% ruby -e 'p Array.new(2) { 12 }'
> [12, 12]
> svg%
>
> svg% ruby -e 'a = Hash.new { 12 }; p a[1]'
> 12
I am still on ruby 1.6.7 so I missed that:
$ ruby -e 'p Array.new(2) { 12 }'
[nil, nil]
> R> Furthermore Tk is somehwat confusing for the beginner because
> R> it uses instance_eval or something completely different to eval
> R> the block.
>
> Why a method must eval the block when it's called ? See Hash::new
it would be less confusing for the beginner if the syntax could be
disambiguated somehow. Clearly you won't write
Hash.new begin 12 end
so why should
Hash.new { 12 }
work?
> R> How to get it consistent? Leave the 2 widely used exceptions
> R> to the rule (no block arg for new) some time to phase out and
> R> use either a clear naming convention (eg new_wb instead of new)
>
> and change the name of *all* methods to have _wb when they use a block ?
The top priority imho is to make ruby at least force an error when
a block expecting method doesn岐 get a block or some method ignores
a given block. Example in 1.6.7:
TCPSocket.new(host,43{|sock|
sock.each{|str| print str}}
it is rather irritating if the block is plainly ignored.
Another example,
http=Net::HTTP.Proxy($proxy_addr,$proxy_port).start(host, port)
simply returns nil as it expects to yield a block but doesn't
complain if there isn't any.
Perhaps it would be possible to use a convention to append eg "&"
to all method names that expect a block?
The idea with "_wb" was really only a last resort workaround for me..
Richard