[#6363] Re: rescue clause affecting IO loop behavior — ts <decoux@...>

>>>>> "D" == David Alan Black <dblack@candle.superlink.net> writes:

17 messages 2000/11/14
[#6367] Re: rescue clause affecting IO loop behavior — David Alan Black <dblack@...> 2000/11/14

Hello again --

[#6582] best way to interleaf arrays? — David Alan Black <dblack@...>

Hello --

15 messages 2000/11/26

[#6646] RE: Array Intersect (&) question — Aleksi Niemel<aleksi.niemela@...>

Ross asked something about widely known and largely ignored language (on

23 messages 2000/11/29
[#6652] RE: Array Intersect (&) question — rpmohn@... (Ross Mohn) 2000/11/29

aleksi.niemela@cinnober.com (Aleksi Niemel) wrote in

[#6723] Re: Array Intersect (&) question — Mathieu Bouchard <matju@...> 2000/12/01

> >Use a hash. Here's code to do both and more. It assumes that

[#6656] printing/accessing arrays and hashes — raja@... (Raja S.)

I'm coming to Ruby with a Python & Common Lisp background.

24 messages 2000/11/30

[ruby-talk:5979] RE: Garbage collection bug: unknown data type 40

From: Aleksi Niemel<aleksi.niemela@...>
Date: 2000-11-01 16:56:42 UTC
List: ruby-talk #5979
Jo reports:
> The following is a program that makes ruby crash with the error
> message:
> 
> ./bicapitalize.rb:19: [BUG] gc_sweep(): unknown data type 40
> ruby 1.6.1 (2000-09-27) [i586-linux-gnu]
> Aborted

Doesn't crash on me.

  $ cat /etc/redhat-release 
  Red Hat Linux release 6.1 (Cartman)

  $ ruby -v
  ruby 1.6.2 (2000-10-16) [i686-linux]

  $ uname -a
  Linux 2.2.12-20smp #1 SMP Mon Sep 27 10:34:45 EDT 1999 i686 unknown

> and writing to stdout. With a sufficiently large input, the error
> message will appear. At least on my machine:

Or then I didn't have "sufficiently large input". My test was chunk of ruby
code 110MB (this small lib of mine doesn't follow the rule Don't Repeat
Yourself literally :). The running time was 10:10 and the process kept
steadily it's hunger for memory around 1.4 MB.

As I couldn't get it crash I didn't try to make it smaller. Are you sure
there's nothing on your example program which could be taken away and still
crash on every run.

	- Aleksi

Ps. without any doubt you know you can achieve elite-style output shorter by
saying:

  cat input | ruby -pe 'gsub!(/\w/){|c| rand < .3 ? c.upcase : c.downcase }'

:)


In This Thread

Prev Next