277152-283124 subjects 277618-284002

^ Dynamic requires
277371 [belorion gma] I don't want to go into to much boring detail as to why I am trying to do
277373 [dblack rubyp] It's because the bare "rescue" only rescues errors that are
277374 [belorion gma] I did not know that! (obviously).

^ dragons and factorials (keyboard input)
277377 [hawat.thufir] I'm getting keyboard input successfully, but I'm getting a string.  I
+ 277378 [adityam umic] Add number = number.to_i or number = Integer(number)
+ 277380 [hawat.thufir] I googled, didn't find the answer, posted, googled more, found the
| + 277383 [mo_mail ongh] Might I recommend that you read a book about Ruby and/ or programming (I
| + 277386 [bbxx789_05ss] str.to_i(base=10)   => integer
| + 277794 [caduceass gm] You want to avoid method's being instantiated per object?  You can
|   277846 [hawat.thufir] def fact(n)
|   277878 [caduceass gm] No, not really.  But keep in mind you can always make a copy of a
|   277957 [hawat.thufir] Thanks for the response, Todd.  I kinda sorta follow what you were
|   277988 [caduceass gm] Well I sorta kinda screwed up.  The Math in the original should be M.
+ 277381 [bbxx789_05ss] print "Enter an integer: "
+ 277397 [tim.pease gm] Others have already answered your question, and it appears you
  277765 [hawat.thufir] In Java String is immutable partly for security reasons.  I don't see

^ unsubscribe
277382 [luis.fernand] charset="US-ASCII"

^ x=[]; x[:bla][:some_key] does not work?
277385 [forum josh.c] PHP lets me easily create multidimensional hashes using the following
+ 277387 [dblack rubyp] Are you sure it's not giving you a "Symbol as array index" error?
+ 277389 [jan.svitok g] As David said, if you want to create hashes, you have to create Hashes ;-)
| + 277391 [lionel-subsc] Ooopps, my bad.
| + 277395 [dblack rubyp] h = Hash.new({})
+ 277393 [sepp2k googl] That's an array. A hash would be x={}
| + 277416 [kbloom gmail] sepp2k's answer is the only correct answer in this thread.
| | 277418 [dblack rubyp] Could you point out the mistakes in my answers for me? I'd be
| | 277421 [kbloom gmail] The Hash.new constructor has several different behaviors depending on
| | 277453 [dblack rubyp] I didn't say it didn't. I'm still wondering what you found in my posts
| | 277468 [kbloom gmail] OK. I see you've got the semantics right, but you didn't point out the
| + 277417 [kbloom gmail] Or use Hash#autonew from the facets gem, which does precisely the same
| + 277522 [hutch recurs] Very nice, Sebastian and Jimmy.
|   277540 [dblack rubyp] class NonexistentKeyError < StandardError
|   277583 [gwtmp01 mac.] a = Hash.new { |h,k| h.fetch k }
+ 277396 [bbxx789_05ss] x = []
+ 277400 [bbxx789_05ss] lol.  Waaaaaaaaaay too late.

^ Re: x=[:some_key] does not work?
277388 [forum josh.c] Ups I'm sorry, I messed things up because PHP uses [] for both arrays
277390 [lionel-subsc] h = Hash.new({})
277394 [sepp2k googl] That won't result in the behaviour most people would expect from a
277399 [bbxx789_05ss] x = Hash.new { Hash.new }
277429 [bbxx789_05ss] and then you followed that up with the very same mistake in your second
277430 [bbxx789_05ss] x =  Hash.new {|hash, key| hash[key] = {} }
277444 [koflerjim ma] a = Hash.new{|h,k| h[k]=Hash.new(&h.default_proc) }

^ How do you write a unit test of methods that needs user inpu
277408 [pood.forums ] Will I need to change my code or is there a way for me to write my unit
+ 277410 [phlipcpp yah] Get with Mocha, a mock-object library. Then mock the method that returns
+ 277433 [bbxx789_05ss] def get_input

^ Re: class from string
277420 [ruby-forum p] FWIW, I searched the Ruby forum for
277474 [ruby-forum p] Bah!  I was too quick on that -- now I'll probably end up asking FAQ'

^ Re: JRuby performance questions answered
277423 [rogerpack200] Congrats on such an important benchmark!  What made the difference 1.0
277523 [charles.nutt] Mostly the compiler, but there's been a number of optimizations across
277530 [GGarramuno a] Isn't that still a correct impression and statement?  Currently the C
277560 [charles.nutt] Ruby 1.9 is not likely to be the standard, widely-used version of Ruby

^ How do I make variables defined in a method accessible on another method?
277424 [victor.reyes] Team,
+ 277425 [mbj seonic.n] Use instance variables!
| 277434 [bbxx789_05ss] class Dog
+ 277426 [list.push gm] class My_Class
+ 277460 [victor.reyes] First, thank you to Markus, Harry and 7stud for your help.

^ Ruvi, Vim, Ruby
277431 [redroofgreen] Is Ruvi (http://ruvi.rubyforge.org/) still active? If not, is there any
+ 277432 [redroofgreen] Oh, I forgot one really important thing -- use Ruby to parse Ruby; to
+ 277764 [martin.kraus] As far as I know it is already possible to use Ruby (and also at least

^ sprintf percent sign problem
277439 [mpthimios gm] I am trying to format some text using sprintf. The text itself
+ 277437 [mpthimios gm] sprintf percent sign problem
| 277440 [bbxx789_05ss] str = "hello%world"
+ 277441 [bbxx789_05ss] Posted via http://www.ruby-forum.com/.
+ 277456 [alex blackke] irb(main):001:0> text = "foo%%bar"

^ (none)
277447 [bigboss64 ip] This is my first thread on this mailing list, so bare with me.

^ Re:
277448 [bigboss64 ip] Dang it.... I forgot to set the subject line, sorry for the idiocy...
277449 [sepp2k googl] If you specify a command line parameter, Kernel#gets treats that as a file
277452 [shortcutter ] I am sorry, but this is plain wrong.
277454 [sepp2k googl] I'm sorry, maybe I'm a little slow, but isn't "Returns (and assigns to $_) the
277463 [shortcutter ] I read your statement to mean that an argument to gets is treated as a
277473 [bigboss64 ip] Works perfectly! I never realized there was a Kernel#gets as well, only knew

^ create image form selection database
277457 [remco.zwaan ] I have a table degree wich is related through a join table with the user
277865 [jacob.basham] A cheap hack, make a simple 1px wide image, and set the image width

^ Emacs highlighting, keywords
277458 [rolf.andreas] I'm a new user trying to set up a Ruby dev environment. I've gotten to
277466 [Rob AgileCon] I set these font faces before I autoload the ruby-mode.  It's old

^ [ANN] Monkeybars 0.5 released
277461 [david koontz] Monkeybars, a cross platform GUI building library has reached 0.5.

^ [ANN] Rucola 0.0.1 released.
277465 [eloy.de.enig] For a screencast (showed at RubyConf by Dr Nic) using the rucola =20
277476 [dangerwillro] Excellent beginning!
277477 [eloy.de.enig] There is also already some code in RubyCocoa that allows you to use
277511 [dangerwillro] I've been working through some books on Cocoa lately to be a little =20
277536 [eloy.de.enig] Just to be clear, you don't need Leopard to play with RubyCocoa.
277544 [dangerwillro] I remember it being introduced or at least getting a little hype back
277547 [eloy.de.enig] I use TextMate exclusively with my RubyCocoa projects.

^ send file from CGI
277469 [detlef.reich] in a webapplication, a user can select from some options. Depending on
277470 [dv voelkerts] Wouldn't be easier to redirect the clients browser to the zip file? In
277471 [detlef.reich] the zip file is not in the web root and also should not be
277888 [mailing.mr g] why not? securing data this way is kinda stupid.

^ This is how we Roll
277475 [transfire gm] I've decide to go ahead and announce Roll(s) today. Even though the
+ 277481 [znmeb cesmai] Sometimes I just want to smack people ... how do we weed out that sort
+ 277490 [barryahanna ] unsubscribe
+ 277495 [transfire gm] Hmm... maybe I have a subconscious tendency I was unaware of...
| 277496 [vjoel path.b] Any reason this returns a list of strings, and not of library objects?
| + 277500 [konrad tyler] charset="iso-8859-1"
| | 277509 [transfire gm] Nah. list is a class method. inspect is an instance method.
| | 277514 [konrad tyler] charset="iso-8859-1"
| | 277515 [transfire gm] Oh, right. I see what you were saying. Not the case though.
| + 277503 [transfire gm] Very much so. Rolls doesn't bother to objectify a library until you
+ 277506 [mortee.lists] The whole thing sounds great! Are the further planned steps secret?
  277521 [transfire gm] No secrets. But the time line is completely open at this point.

^ ANN: Sequel 0.3.3 Released
277478 [ciconia gmai] Sequel version 0.3.3 has just been released. This release includes

^ ri and docu
277487 [shevegen lin] does anyone of you know where ri actually stores the content of its
277942 [ryand-ruby z] 504 % cd /usr/local/share/ri/1.8/system/
277950 [shevegen lin] Thanks!

^ Re: Any recovering PHP coders around? was Re: x=[:some_key] does not work?
277491 [alex blackke] Way, way back I started a section of the Rails wiki
277513 [dangerwillro] Could be a trap. It may be tricky to keep it focused. Personally, I

^ Re: REXML (1.8.6-p110) backwards compatibility problem with
277494 [mbbx6spp tau] I got these string of errors in the order reported also.  I solved this

^ Problems install mongrel...
277497 [sonny.chee g] Hey Guys,

^ Check if MyClass extends OtherClass?
277498 [forum josh.c] def OtherClass
277499 [vjoel path.b] class OtherClass
277505 [forum josh.c] Thank you very much! So very semantic and easy that I couldn't have

^ Drawing in ruby (antigrain bindings)
277502 [oga_emmanuel] options are ugly IMHO, because require a very big framework to work
+ 277524 [why ruby-lan] Well, I don't think the Ruby/AGG and Ruby/View stuff ever came to
+ 277538 [kyosuke kima] This might sound as crazy suggestion, but you might as well generate SVG
+ 277542 [AEtzold gmx.] Dear Emanuel,
  277543 [dangerwillro] Give RMagick a try, it's not so leaky as you've heard.

^ [ANN] heel 0.4.0 Released
277508 [jeremy hineg] heel version 0.4.0 has been released.

^ 30 lines implementation of eRuby
277512 [kwa kuwata-l] Do you like eRuby? Do you want to customize ERB?

^ [n00b] Reading a class-file and calling it at runtime.
277517 [Misc your-pa] I'm trying to read-in a folder full of "plug-ins" and call each of them,
277534 [sean.ohalpin] # ./myplugin.rb
+ 277562 [Misc your-pa] <3736dd30711042349n7225229dw4af74110f2a52048@mail.gmail.com>,
+ 277647 [Misc your-pa] <3736dd30711042349n7225229dw4af74110f2a52048@mail.gmail.com>,
  277648 [Misc your-pa] It seems that my problems had to do with leaving rails (WEBrick) running

^ Re: Reading a class-file and calling it at runtime.
277518 [oga_emmanuel] I'm not sure what you are trying to acomplish... but here is a trick i
277519 [oga_emmanuel] mmm i believe i messed up the things a bit, this should be the right
277577 [bbxx789_05ss] Maybe you should post a simplified version of one of the files you are
277579 [bbxx789_05ss] I have a question about using Object as the receiver in the above line.
+ 277581 [bbxx789_05ss] Object
+ 277584 [phrogz mac.c] For me personally, having someone write Module.const_get versus
| 277592 [ara.t.howard] i prefer Object.const_get too, although for different reasons: it
| + 277602 [sean.ohalpin] You can also use the predefined constant TOPLEVEL_BINDING, e.g.
| + 277604 [m_goldberg a] You probably have a good reason for writing the above rather than the
|   + 277611 [ara.t.howard] a) always forgetting what the constant is named
|   + 277612 [ara.t.howard] laziness ;-)  sorry.
+ 277600 [sean.ohalpin] It's a way of looking up constants in the scope of the top level
  277614 [bbxx789_05ss] class Dog
  277649 [sean.ohalpin] Greeting = "goodbye"

^ def blah do |x| -- alternate method definition syntax
277525 [joe07734 gma] This came up in a discussion about Ruby with a friend who is learning...
+ 277526 [matz ruby-la] This syntax disallows optional arguments.  We can't just parse them.
| + 277546 [joe07734 gma] Thanks matz and all. The define_method() trick hadn't occurred to me
| | + 277548 [halostatue g] Nope. Not something that seems odd at all after five years of using Ruby. ;)
| | + 277550 [phrogz mac.c] Because the | operator exists, and there are some edge cases where it
| + 277558 [micathom gma] Would it be possible, hypothetically speaking, to make the parser
|   277561 [bermonruf gm] I think its almost perfect the way it is, but i would really enjoy blocks
+ 277527 [ruby gmail.c] You don't have to do blah.call, you can do blah[5] which is pretty close  :)
| 277528 [ruby gmail.c] Apologies...
+ 277529 [konrad tyler] charset="iso-8859-1"

^ ANN: DataMapper 0.2.3 Released
277531 [ssmoot gmail] DataMapper version 0.2.3 has just been released.
279018 [lists source] Wow...datamapper looks extremely interesting and is new on my radar.

^ good method for free time
277532 [service.pvps] www.pvpsale.com

^ scruffy question
277545 [remco.zwaan ] installed scruffy...and put the code below in my controller.
277867 [jacob.basham] I'm not familiar with what you are doing, but I'm pretty sure you need
283392 [gdumont gmai] send_data(graph.render(:width => 800, :as => 'PNG', :to =>
284973 [gdumont gmai] def render_scruffy_graph

^ Procmail to ruby
277554 [mislav_kasne] I want to write a Procmail recipe that pipes a message to a
+ 277555 [fwmailinglis] charset="us-ascii"
+ 277567 [ruby-lang da] e.g.
  277606 [barjunk attg] The above implies a properly formated bang line, correct?
  277740 [ruby-lang da] As quoted yes, but the following works as well, assuming ruby in on

^ Ruby: Watir HRESULT error code 0x80020006
277563 [averdonsmith] I'm having some problems with a Ruby script that I've adapted to use

^ libnet4r errors
277568 [mcse palstek] For my packetgenerator, I use a rubyadapter to share the available

^ Pulseaudio c extension callback function
277569 [edder tkwspi] I started working on a ruby wrapper for pulseaudio. I am a bit out of my
277582 [pbrannan atd] klass is a temporary variable; you probably don't want to take its
277586 [edder tkwspi] VALUE obj = (VALUE) klass;
277587 [pbrannan atd] Oops, typo. :)

^ [ANN] CruiseControl.rb 1.2.1
277570 [alexey.verkh] CruiseControl.rb 1.2.1 is out.

^ compare 2 "arrays"
277572 [ozric web.de] sorry i'm  a beginner with ruby and hanging on
277589 [johan.veenst] On line 36 of the source file mp_hash.rb is something called 'found',
277594 [ozric web.de] arrgh a classical example -

^ Re: CruiseControl.rb 1.2.1
277573 [djberg96 gma] On Nov 5, 10:33 am, "Alexey Verkhovsky" <alexey.verkhov...@gmail.com>
277989 [alexey.verkh] CVS is legacy tech by now. I have yet to see an actual Ruby project
+ 277994 [djberg96 gma] On Nov 7, 6:01 pm, "Alexey Verkhovsky" <alexey.verkhov...@gmail.com>
| + 278001 [konrad tyler] charset="iso-8859-1"
| + 278140 [alexey.verkh] Good point. :) Although I don't see any reason why would anybody still
+ 277997 [luislavena g] On Nov 7, 10:01 pm, Alexey Verkhovsky <alexey.verkhov...@gmail.com>

^ winlogon - cannot set empty password from ruby
277575 [hramrach cen] I tried to make a ruby script that makes Windows XP automatically log

^ Library/gem popularity index?
277580 [lists source] Guys,
277593 [djberg96 gma] There's gemtacular at http://www.gemtacular.com/

^ fastercsv:  row["header1"] syntax doesn't work, why?
277590 [bbxx789_05ss] $ cat data.csv
277591 [bbxx789_05ss] Arrrgh.  vim was turning my tabs into spaces, so the '\t' separator

^ File Save Question
277596 [nonstickglue] I've created a program that will run and update the array storing the
+ 277597 [olsonas gmai] old_array = [1,2,3,4]
+ 277605 [mguterl gmai] Try googling "ruby serialization" that will give you more information on the
+ 277613 [bbxx789_05ss] You can't.  You have to save the data to a file and then read the data
  277620 [dangerwillro] If you don't want to use YAML or other methods,
  277621 [nonstickglue] I seem to have everything working with the YAML, so all is good.

^ Re: [QUIZ] Editing Text (#145)
277598 [jamesbkoppel] (I thought I had sent in my solution yesterday, but it didn't send, since I didn't realize that Yahoo now sometimes demands a CAPTCHA.)
277750 [eric.mahurin] I'm glad to see a linked-list solution.  Another approach to use is to
277755 [jamesbkoppel] than on a character. Because of this, inserting before and after is the

^ Sending cell-phone text-message from Rails
277599 [pdavidow gma] Is there a way of sending a cell-phone text-message from Rails? If so,
+ 277609 [mguterl gmai] If you know the carrier you can do it pretty easily with email.  This may or
+ 277610 [mental rydia] You would probably want to use one of the available Ruby libraries for
+ 277629 [jeremywoerti] There sure is. 37signals has an application called backpack, which

^ Superclass of a module
277601 [todd browser] In Ruby 1.8, a Module does not have a superclass according to the
277607 [mental rydia] Foo.append_features works because Foo is a Module (Foo.class == Module),
277624 [todd browser] Does this make Foo a singleton class of Module?  This would explain how
277708 [rick.denatal] No, Foo is an instance of Module.
277799 [todd browser] Actually, Module does provide append_features.  It's just that

^ naked object macros
277603 [keynan howe.] I have
+ 277608 [mguterl gmai] Try this
+ 277616 [transfire gm] $ gem install facets

^ Faking the refering page with Mechanize
277615 [ehudros gmai] I am trying to access a certain web page from my server, but I want the
277617 [konrad tyler] charset="utf-8"
277619 [ehudros gmai] Thanks for the quick reply :)
277891 [ehudros gmai] Anyone? I'm really stumped here :)
277896 [pticedric gm] I tried it and it seems that the header is correct.
277916 [ehudros gmai] Wow, that's strange.
278080 [ehudros gmai] ref =
+ 278093 [ehudros gmai] OK, I'm stupid :)
| 278098 [pticedric gm] I don't think that you can do what you want this way, the referer is set by
| 278101 [ehudros gmai] Yes, it has finally dawned on me that what I'm trying to do is not
| 278106 [pticedric gm] the XMLHttpRequest Object has a method setRequestHeader so we can change
+ 278094 [pticedric gm] #irb
  278097 [ehudros gmai] 0.6.10.