ara.t.how... / noaa.gov wrote:

> one possible reason
>
>
>    harp:~ > cat a.rb
>    require 'once'
>    class NotRobust
>      def foo() p 42 end
>      once :foo
>    end
>
>    nr = NotRobust.new
>    2.times{ nr.foo }
>
>
>    harp:~ > ruby a.rb
>    42
>
>
>
>    harp:~ > cat a.rb
>    require 'once'
>    class NotRobust
>      def foo() p 42 end
>      2.times{ once :foo }
>    end
>
>    nr = NotRobust.new
>    2.times{ nr.foo }
>
>
>    harp:~ > ruby a.rb
>    Segmentation fault (core dumped)
>
>
>    harp:~ > ruby --version
>    ruby 1.8.4 (2005-12-01) [i686-linux]
>
> regards.
>
> -a
whoops, o.k. I see...
but... why should I do this: 2.times { once :foo } ? o.k. I can
imagine, ruby should allow everything without coredumping ;-)