[#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:5978] Garbage collection bug: unknown data type 40

From: Jo Totland <jo@...>
Date: 2000-11-01 16:10:02 UTC
List: ruby-talk #5978
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

Here is the program:
-----------------------------------------------------------------
#! /usr/bin/ruby

srand

$aGlobalVar = []

def doit! text
  text.downcase!
  nothing text
  bicapitalize! text
end

def nothing text
  for i in 0...$aGlobalVar.length
  end
end

def bicapitalize! text
  text.gsub!(/[a-z]/) { |m| rand < .3 ? m.upcase : m }
end

STDIN.each_line { |line|
  doit! line
  print line
}
print "\n"
------------------------------------------------------------------

This program should be run as a unix filter taking input from stdin
and writing to stdout. With a sufficiently large input, the error
message will appear. At least on my machine:

[jo@bogon ruby]$ cat /etc/mandrake-release
Linux Mandrake release 7.2 (Odyssey) for i586

[jo@bogon ruby]$ uname -a
Linux bogon.jonett 2.2.17-21mdk #1 Thu Oct 5 13:16:08 CEST 2000 i686 unknown

[jo@bogon ruby]$ rpm -q ruby
ruby-1.6.1-2mdk


 -Jo
-- 
Hours and hours of sheer boredom, punctuated by lunch.

In This Thread

Prev Next