[#329967] Ruby beginner Problem — Zayd Connor <devrubygem@...>

I get the following error message when running the code below:

18 messages 2009/03/01
[#329972] Re: Ruby beginner Problem — lasitha <lasitha.ranatunga@...> 2009/03/01

On Sun, Mar 1, 2009 at 10:46 AM, Zayd Connor <devrubygem@gmail.com> wrote:

[#329973] Re: Ruby beginner Problem — Zayd Abdullah <devrubygem@...> 2009/03/01

Thanks Lasitha that worked perfect. I'm slowly getting more comfortable with

[#329975] Re: Ruby beginner Problem — Justin Collins <justincollins@...> 2009/03/01

Zayd Abdullah wrote:

[#330022] Delegating class methods — abc <arcadiorubiogarcia@...>

Hi all,

17 messages 2009/03/01

[#330038] Rub 1.9: "inline rescue" doesn't work? — Iñaki Baz Castillo <ibc@...>

Hi, is there any explanation for the folowing big difference between the sa=

11 messages 2009/03/01

[#330067] passing a method as a paramter — Sarah Allen <sarah@...>

I'm probably missing some basic Ruby syntax, but I'm relatively new to

13 messages 2009/03/02

[#330097] Compiling a Ruby app — Sharagoz -- <blashyrkh1@...>

Hi

22 messages 2009/03/02
[#330193] Re: Compiling a Ruby app — David Masover <ninja@...> 2009/03/03

Sharagoz -- wrote:

[#330209] expanding environment variable — Daniel Schoch <trash@...>

Hi,

13 messages 2009/03/03
[#330212] Re: expanding environment variable — Dominik Honnef <dominikho@...> 2009/03/03

On [Tue, 03.03.2009 23:28], Daniel Schoch wrote:

[#330246] fixnum problem plz help — Guy Dols <guy_dols@...>

hy

14 messages 2009/03/03

[#330287] Any solutions to Ruby's inconsistencies? — "C. Dagnon" <c-soc-rubyforum@...>

Ruby has definite positives over Java and even other scripting

29 messages 2009/03/04
[#330292] Re: Any solutions to Ruby's inconsistencies? — Yossef Mendelssohn <ymendel@...> 2009/03/04

On Mar 4, 10:02=A0am, "C. Dagnon" <c-soc-rubyfo...@dagnon.net> wrote:

[#330322] Re: Any solutions to Ruby's inconsistencies? — "C. Dagnon" <c-soc-rubyforum@...> 2009/03/04

Yossef Mendelssohn wrote:

[#330388] Re: Any solutions to Ruby's inconsistencies? — Yossef Mendelssohn <ymendel@...> 2009/03/05

On Mar 4, 3:32=A0pm, "C. Dagnon" <c-soc-rubyfo...@dagnon.net> wrote:

[#330401] Re: Any solutions to Ruby's inconsistencies? — "C. Dagnon" <c-soc-rubyforum@...> 2009/03/05

Yossef Mendelssohn wrote:

[#330363] Ruby -Question about Framewroks — jazzez ravi <jazzezravi@...>

Hi All,

12 messages 2009/03/05

[#330383] add a new line after, w/txtfile thats comma delimited — Mmcolli00 Mom <mmc_collins@...>

How do you add a new line after you have split a text file with

16 messages 2009/03/05

[#330387] Ruby - Imperative Language Features? — Mike Stephens <rubfor@...>

The Wikipedia entry for Ruby says:

12 messages 2009/03/05

[#330601] how to un-ragged a 2D array? — Phlip <phlip2005@...>

Rubies:

12 messages 2009/03/07

[#330630] Can I access or find a object from it's instance variable? — Aki Wakabayashi <zzyzx2001@...>

Hello.

14 messages 2009/03/08

[#330638] OO style tutorials? — Paul Archer <paul@...>

I'm pretty new to Ruby, and while I've read (and mostly get) several books

20 messages 2009/03/08

[#330665] What are the 5 most innovative ruby projects/libraries? — Camille Roux <roux.camille@...>

Hi,

27 messages 2009/03/08

[#330701] Ruby OpenGL Gears example that uses shiny and velvet GLSL shaders — Michael Brooks <michael.brooks@...>

Hello:

11 messages 2009/03/09
[#330722] Re: Ruby OpenGL Gears example that uses shiny and velvet GLSL shaders — Matthias Reitinger <reitinge@...> 2009/03/09

Michael Brooks wrote:

[#330718] MacRuby 0.4 — Laurent Sansonetti <laurent.sansonetti@...>

Hi,

17 messages 2009/03/09

[#330954] How Many hours in A day — Zayd Connor <devrubygem@...>

I have a very simple ? How many hours in a day should someone who is new

17 messages 2009/03/11

[#330990] How to read a charecters from and image? — rails and rails only <mjayakumar2k6@...>

16 messages 2009/03/12
[#330993] Re: How to read a charecters from and image? — pjb@... (Pascal J. Bourguignon) 2009/03/12

rails and rails only <mjayakumar2k6@yahoo.com> writes:

[#330994] Re: How to read a charecters from and image? — Redd Vinylene <reddvinylene@...> 2009/03/12

Stop that! He's probably looking to crack CAPTCHAs.

[#331216] does IO.read block? — Michael Malone <michael.malone@...>

Hi All,

16 messages 2009/03/15
[#331218] Re: does IO.read block? — Robert Klemme <shortcutter@...> 2009/03/15

On 15.03.2009 23:02, Michael Malone wrote:

[#331307] Trying to install Fox, FXRuby, and IFMapper on Mac OS X — kpkilburn@...

I can't seem to find a specific answer on this...

12 messages 2009/03/16

[#331326] Dynamically extending modules once they have been included — pete@...373.net

It doesn't seem possible to dynamically extend modules once they have

14 messages 2009/03/17

[#331371] free RAM problem — Edouard Dantes <edrd.dantes@...>

Hi,

14 messages 2009/03/17

[#331411] hpricot 0.7 — _why <why@...>

Please enjoy a succulent, new Hpricot. A bit faster, some Ruby 1.9

25 messages 2009/03/17

[#331476] Complex sort of matrix possible, e.g. like Excel? — RichardOnRails <RichardDummyMailbox58407@...>

Hi,

18 messages 2009/03/18

[#331478] REXML get specific element — Pierre Pat <theyojimbo@...>

All,

15 messages 2009/03/18

[#331568] Modulo ? — Zayd Connor <devrubygem@...>

Maybe i need to get some sleep, but can someone explain how modulos

16 messages 2009/03/19

[#331628] Passing a named function instead of a code block? — Paul Jungwirth <once@9stmaryrd.com>

Hello,

13 messages 2009/03/20
[#331630] Re: Passing a named function instead of a code block? — Matthias Reitinger <reitinge@...> 2009/03/20

Paul Jungwirth wrote:

[#331760] Ruby GUI Libs — ntwrkd <ntwrkd@...>

Is there a nicer GUI framework for Ruby other than RubyGoo?

12 messages 2009/03/21

[#331793] Newbie needs help with first project — Daniel Dale <dochappy@...>

I was told about Ruby several weeks ago and started my journey lol. I've

15 messages 2009/03/22
[#331796] Re: Newbie needs help with first project — Stefan Codrescu <fixxie.wits@...> 2009/03/22

On Sun, Mar 22, 2009 at 9:32 AM, Daniel Dale <dochappy@gmail.com> wrote:

[#331803] convert PNG to hex — jeljer te Wies <jeljer@...>

Hey people! ..

20 messages 2009/03/22

[#331899] Test::Unit - same test, different "args" — "Luke St.Clair" <secureboot@...>

I need to run the same unit test case more than 10 times (around 150

14 messages 2009/03/23

[#331924] Mimic AES_ENCRYPT and AES_DECRYPT functions in Ruby — Felipe Coury <felipe.coury@...>

Hello there!

20 messages 2009/03/24
[#331931] Re: Mimic AES_ENCRYPT and AES_DECRYPT functions in Ruby — gcristelli <giovanni.cristelli@...> 2009/03/24

On 24 Mar, 04:21, Felipe Coury <felipe.co...@gmail.com> wrote:

[#331938] Re: Mimic AES_ENCRYPT and AES_DECRYPT functions in Ruby — Felipe Coury <felipe.coury@...> 2009/03/24

Giovanni / Rob,

[#331940] Re: Mimic AES_ENCRYPT and AES_DECRYPT functions in Ruby — Felipe Coury <felipe.coury@...> 2009/03/24

Some more discoveries...

[#331941] Re: Mimic AES_ENCRYPT and AES_DECRYPT functions in Ruby — Felipe Coury <felipe.coury@...> 2009/03/24

Just as a FYI, it works!!!

[#331948] Re: Mimic AES_ENCRYPT and AES_DECRYPT functions in Ruby — Rob Biedenharn <Rob@...> 2009/03/24

On Mar 24, 2009, at 2:35 AM, Felipe Coury wrote:

[#365126] Re: Mimic AES_ENCRYPT and AES_DECRYPT functions in Ruby — Joshua Mckinney <joshmckin@...> 2010/07/01

Having no luck with this. Getting the following error when generating

[#331930] tagz-5.0.0 — "ara.t.howard" <ara.t.howard@...>

44 messages 2009/03/24
[#332078] Re: [ANN] tagz-5.0.0 — "Andrew S. Townley" <ast@...> 2009/03/25

Hi Ara,

[#332095] Re: [ANN] tagz-5.0.0 — "ara.t.howard" <ara.t.howard@...> 2009/03/25

[#332141] Re: [ANN] tagz-5.0.0 — "Andrew S. Townley" <ast@...> 2009/03/25

On Wed, 2009-03-25 at 23:23 +0900, ara.t.howard wrote:

[#332160] Re: [ANN] tagz-5.0.0 — "ara.t.howard" <ara.t.howard@...> 2009/03/26

[#331971] : HOWTO start irb on a different object — Jeremy Henty <onepoint@...>

I wanted to have irb start its session on an object other than the

10 messages 2009/03/24

[#332023] ruby and 2D graphics — Philip Müller <me@...>

Hi everybody,

22 messages 2009/03/24
[#332029] Re: ruby and 2D graphics — Philip Müller <me@...> 2009/03/24

On Tue, 24 Mar 2009 21:08:34 +0100, Peter Zotov <whitequark@whitequark.ru>

[#332112] Parsing xml — Arun Kumar <arunkumar@...>

Hi,

24 messages 2009/03/25
[#332115] Re: Parsing xml — "Peter Zotov" <whitequark@...> 2009/03/25

Quoting "Arun Kumar" <arunkumar@innovaturelabs.com>:

[#332116] Re: Parsing xml — Arun Kumar <arunkumar@...> 2009/03/25

Peter Zotov wrote:

[#332118] Re: Parsing xml — "Peter Zotov" <whitequark@...> 2009/03/25

Quoting "Arun Kumar" <arunkumar@innovaturelabs.com>:

[#332206] Update latest Ruby Version 1.9 on Mac OSX — Thomas Khaipi <sayakyi@...>

Dear All,

14 messages 2009/03/26

[#332357] testy.rb - ruby testing that's mad at the world — "ara.t.howard" <ara.t.howard@...>

55 messages 2009/03/28
[#332418] Re: testy.rb - ruby testing that's mad at the world — Brian Candler <b.candler@...> 2009/03/29

Ara Howard wrote:

[#332405] Ruby 1.9, OS X, command line: negative string size (ArgumentError) — Bartlomiej Owczarek <bartlomiej@...>

Hello,

13 messages 2009/03/29

[#332474] Symbols garbage collector in Ruby1.9, fixed? — Iñaki Baz Castillo <ibc@...>

Hi, in Ruby 1.8 there is an issue when adding more and more Symbols

27 messages 2009/03/30

[#332520] When to use instance variables @ — Steve Dogers <stevedogers@...>

Hi, I have a couple questions about instance variables in Ruby.

20 messages 2009/03/30

[#332547] Localmemcache-0.2.0: The beauty of memcached. For local data. Blazingly fast. — "Sven C. Koehler" <schween@...>

Hi,

13 messages 2009/03/30

[#332624] Move over, Phusion, here comes the *real* Enterprise Edition! — Jg W Mittag <JoergWMittag+Usenet@...>

Hi!

20 messages 2009/03/31

Strange bug in irb1.9

From: "Peter Zotov" <whitequark@...>
Date: 2009-03-24 13:36:30 UTC
List: ruby-talk #331975
Hi.

I am developing bindings for libconfig and discovered a strange bug in =20
irb1.9 (ruby 1.9.0 (2008-06-20 revision 17482) [i486-linux], irb =20
0.9.5(05/04/13); Debian GNU/Linux 5.0/lenny): ruby1.9 executes my =20
script nice, but irb crashes at some random place. Crash is affected =20
by most theoretically unlinked commands and may disappear even after =20
removing a comment (sic).
You can download my extension sources here =20
(http://files.whitequark.ru/libconfig-ruby.tbz2).

Crashing script:
--- BEGIN ---
require 'rconfig'
c =3D Config.new

c.read('test.cfg')
# =3D> false

c.append 'fixnum', Config::Fixnum.new(150)
# #<Config::Fixnum...>

f1 =3D Config::Fixnum.new(1)
c.append 'another_fixnum', f1

f2 =3D Config::Fixnum.new(256)
c.append 'next_fixnum', f2

p c.size
# =3D> 2

c.delete(f1)            # by element
c.delete(0)             # by index
c.delete('next_fixnum') # by name
# note: (at now) you cannot delete nested elements by Config#delete
#       you can do c['nested.element'].parent.delete(c['nested.element'])

p c.size
# =3D> 0

l =3D Config::List.new
c.append 'the_list', l

l.append Config::String.new("abcdef")
l << Config::Float.new(3.14)
--- END ---

Sample log:
--- BEGIN ---
whitequark@hell:~$ tar xf libconfig-ruby.tbz2
whitequark@hell:~$ cd libconfig-ruby/ext/
whitequark@hell:~/libconfig-ruby/ext$ ruby1.9 extconf.rb
checking for rb_block_call() in ruby/ruby.h... yes
creating Makefile
whitequark@hell:~/libconfig-ruby/ext$ make
cc -I. -I/usr/include/ruby-1.9.0/i486-linux -I/usr/include/ruby-1.9.0 =20
-I. -DHAVE_RB_BLOCK_CALL  -D_FILE_OFFSET_BITS=3D64  -fPIC =20
-fno-strict-aliasing -g -g -O2 -O2 -g -Wall -Wno-parentheses  -fPIC    =20
-o rconfig.o -c rconfig.c
cc -shared -o rconfig.so rconfig.o -L. -L/usr/lib -L.  -rdynamic =20
-Wl,-export-dynamic     -lruby1.9  -lconfig   -lpthread -lrt -ldl =20
-lcrypt -lm   -lc
whitequark@hell:~/libconfig-ruby/ext$ ruby1.9 crash.rb
3

whitequark@hell:~/libconfig-ruby/ext$ irb1.9 crash.rb
crash.rb(main):001:0> require 'rconfig'
=3D> true
crash.rb(main):002:0> c =3D Config.new
=3D> #<Config:0x9dd76d4 @config=3D#<Object:0x9dd76c0>>
crash.rb(main):003:0>
crash.rb(main):004:0* c.read('test.cfg')
=3D> false
crash.rb(main):005:0> # =3D> false
crash.rb(main):006:0*
crash.rb(main):007:0* c.append 'fixnum', Config::Fixnum.new(150)
=3D> #<Config::Fixnum:0x9dc0dd0 @setting=3D#<Object:0x9dc0d30>, =20
@value=3D150, @format=3D0>
crash.rb(main):008:0> # #<Config::Fixnum...>
crash.rb(main):009:0*
crash.rb(main):010:0* f1 =3D Config::Fixnum.new(1)
=3D> #<Config::Fixnum:0x9db6a9c @setting=3Dnil, @value=3D1, @format=3D0>
crash.rb(main):011:0> c.append 'another_fixnum', f1
=3D> #<Config::Fixnum:0x9db6a9c @setting=3D#<Object:0x9db11f0>, @value=3D1, =
=20
@format=3D0>
crash.rb(main):012:0>
crash.rb(main):013:0* f2 =3D Config::Fixnum.new(256)
=3D> #<Config::Fixnum:0x9daa828 @setting=3Dnil, @value=3D256, @format=3D0>
crash.rb(main):014:0> c.append 'next_fixnum', f2
=3D> #<Config::Fixnum:0x9daa828 @setting=3D#<Object:0x9da86f4>, =20
@value=3D256, @format=3D0>
crash.rb(main):015:0>
crash.rb(main):016:0* p c.size
3
=3D> 3
crash.rb(main):017:0> # =3D> 2
crash.rb(main):018:0*
crash.rb(main):019:0* c.delete(f1)            # by element
=3D> nil
crash.rb(main):020:0> c.delete(0)             # by index
=3D> nil
crash.rb(main):021:0> c.delete('next_fixnum') # by name
=3D> nil
crash.rb(main):022:0> # note: (at now) you cannot delete nested =20
elements by Config#delete
crash.rb(main):023:0* #       you can do =20
c['nested.element'].parent.delete(c['nested.element'])
crash.rb(main):024:0*
crash.rb(main):025:0* p c.size

=3D> 0
crash.rb(main):026:0> # =3D> 0
crash.rb(main):027:0*
crash.rb(main):028:0* l =3D Config::List.new
=3D> #<Config::List:0x9ccb128 @list=3D[], @setting=3Dnil>
crash.rb(main):029:0> c.append 'the_list', l
=3D> #<Config::List:0x9ccb128 @list=3D[], @setting=3D#<Object:0x9cc91fc>>
crash.rb(main):030:0>
crash.rb(main):031:0* l.append Config::String.new("abcdef")
=3D> #<Config::String:0x9c7e92c @setting=3D#<Object:0x9c7e8c8>, =20
@value=3D"abcdef", @format=3D0>
crash.rb(main):032:0> l << Config::Float.new(3.14)
crash.rb:32: [BUG] Segmentation fault
ruby 1.9.0 (2008-06-20 revision 17482) [i486-linux]

-- control frame ----------
c:0024 p:---- s:0080 b:0080 l:000079 d:000079 CFUNC  :<<
c:0023 p:0021 s:0076 b:0076 l:001f74 d:0002fc EVAL   crash.rb:32
c:0022 p:---- s:0074 b:0074 l:000073 d:000073 FINISH :empty?
c:0021 p:---- s:0072 b:0072 l:000071 d:000071 CFUNC  :eval
c:0020 p:0023 s:0065 b:0065 l:000064 d:000064 METHOD =20
/usr/lib/ruby/1.9.0/irb/workspace.rb:80
c:0019 p:0025 s:0058 b:0057 l:000056 d:000056 METHOD =20
/usr/lib/ruby/1.9.0/irb/context.rb:218
c:0018 p:0024 s:0052 b:0052 l:0007bc d:000051 BLOCK  =20
/usr/lib/ruby/1.9.0/irb.rb:149
c:0017 p:0025 s:0044 b:0044 l:000043 d:000043 METHOD =20
/usr/lib/ruby/1.9.0/irb.rb:263
c:0016 p:0009 s:0039 b:0039 l:0007bc d:000038 BLOCK  =20
/usr/lib/ruby/1.9.0/irb.rb:146
c:0015 p:0093 s:0035 b:0035 l:000022 d:000034 BLOCK  =20
/usr/lib/ruby/1.9.0/irb/ruby-lex.rb:243
c:0014 p:---- s:0034 b:0034 l:000033 d:000033 FINISH :block_given?
c:0013 p:---- s:0032 b:0032 l:000031 d:000031 CFUNC  :loop
c:0012 p:0007 s:0029 b:0029 l:000022 d:000028 BLOCK  =20
/usr/lib/ruby/1.9.0/irb/ruby-lex.rb:230
c:0011 p:---- s:0029 b:0029 l:000028 d:000028 FINISH :each
c:0010 p:---- s:0027 b:0027 l:000026 d:000026 CFUNC  :catch
c:0009 p:0017 s:0023 b:0023 l:000022 d:000022 METHOD =20
/usr/lib/ruby/1.9.0/irb/ruby-lex.rb:229
c:0008 p:0034 s:0020 b:0020 l:0007bc d:0007bc METHOD =20
/usr/lib/ruby/1.9.0/irb.rb:145
c:0007 p:0009 s:0017 b:0017 l:001d6c d:000016 BLOCK  =20
/usr/lib/ruby/1.9.0/irb.rb:69
c:0006 p:---- s:0017 b:0017 l:000016 d:000016 FINISH :(null)
c:0005 p:---- s:0015 b:0015 l:000014 d:000014 CFUNC  :catch
c:0004 p:0152 s:0011 b:0011 l:001d6c d:001d6c METHOD =20
/usr/lib/ruby/1.9.0/irb.rb:68
c:0003 p:0033 s:0006 b:0006 l:000005 d:000005 TOP    /usr/bin/irb1.9:12
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH :private_class_method
c:0001 p:0000 s:0002 b:0002 l:000001 d:000001 TOP    <dummy toplevel>:17
---------------------------
DBG> : "crash.rb:32:in `<<'"
DBG> : "crash.rb:32:in `irb_binding'"
DBG> : "/usr/lib/ruby/1.9.0/irb/workspace.rb:80:in `eval'"
DBG> : "/usr/lib/ruby/1.9.0/irb/workspace.rb:80:in `evaluate'"
DBG> : "/usr/lib/ruby/1.9.0/irb/context.rb:218:in `evaluate'"
DBG> : "/usr/lib/ruby/1.9.0/irb.rb:149:in `block (2 levels) in eval_input'"
DBG> : "/usr/lib/ruby/1.9.0/irb.rb:263:in `signal_status'"
DBG> : "/usr/lib/ruby/1.9.0/irb.rb:146:in `block in eval_input'"
DBG> : "/usr/lib/ruby/1.9.0/irb/ruby-lex.rb:243:in `block (2 levels) =20
in each_top_level_statement'"
DBG> : "/usr/lib/ruby/1.9.0/irb/ruby-lex.rb:230:in `loop'"
DBG> : "/usr/lib/ruby/1.9.0/irb/ruby-lex.rb:230:in `block in =20
each_top_level_statement'"
DBG> : "/usr/lib/ruby/1.9.0/irb/ruby-lex.rb:229:in `catch'"
DBG> : "/usr/lib/ruby/1.9.0/irb/ruby-lex.rb:229:in `each_top_level_statement=
'"
DBG> : "/usr/lib/ruby/1.9.0/irb.rb:145:in `eval_input'"
DBG> : "/usr/lib/ruby/1.9.0/irb.rb:69:in `block in start'"
DBG> : "/usr/lib/ruby/1.9.0/irb.rb:68:in `catch'"
DBG> : "/usr/lib/ruby/1.9.0/irb.rb:68:in `start'"
DBG> : "/usr/bin/irb1.9:12:in `<main>'"
-- backtrace of native function call (Use addr2line) --
0xb7efac46
0xb7e243a9
0xb7e2441a
0xb7eaba56
0xb7f6e40c
0xb7ee5980
0xb7ef2b07
0xb7ef3a12
0xb7e56f2a
0xb7e013e5
0xb7f61434
0xb7ee6bfb
0xb7ee9b55
0xb7eec59e
0xb7ef1a84
0xb7ef2613
0xb7ef2a4e
0xb7ee6c30
0xb7ee9b55
0xb7eeb8b4
0xb7ef1a84
0xb7ef6add
0xb7e263c1
0xb7ee872c
0xb7ee6c12
0xb7ee9b55
0xb7eeb8b4
0xb7ef1a84
0xb7ef64a9
0xb7ee6c30
0xb7ee9b55
0xb7eeb8b4
0xb7ef1a84
0xb7ef64a9
0xb7ee6c30
0xb7ee9b55
0xb7eeb8b4
0xb7ef1a84
0xb7ef1cad
0xb7e26bd7
0xb7e28156
0x8048794
0xb7c17775
0x8048681
-------------------------------------------------------
--- END ---

--
   WBR, Peter Zotov

In This Thread

Prev Next