238273-388714

238097-240134 subjects 238527-245556

How to "pass" the current binding's block to some other method?
238273 [lyle.johnson] def try(x, y, z)
238275 [gavin@re in ] def try( hash, &block )
+ 238279 [lyle.johnson] For the purposes of this discussion, yes. Perhaps a better way to
| + 238286 [gavin@re in ] To be clear: you *only* need to modify your new (overriding) try
| | 238293 [lyle.johnson] Huh. I tried that with my "real" code and got an error (i.e. with Ruby
| + 238289 [vjoel@pa h. ] Does this help?
|   238294 [lyle.johnson] Ah, yes, that ought to do the trick too. Thanks!
|   + 238297 [vjoel@pa h. ] It *might* be faster, too, if that matters. It doesn't create a Proc
|   + 238330 [ezmobius@gm ] def try(x, y, z)
|     + 238337 [vjoel@pa h. ] Cool, &yield is new to me!
|     + 238346 [pit@ca it in] yield is calling the block, which returns nil. Calling old_try with &nil
+ 238287 [ mfp@ac .o g] def old_try

Using RSpec in the Ruby debugger
238276 [greg.hurrell] Is it possible to run RSpec specs from inside the Ruby debugger? I've
238371 [greg.hurrell] Ok, for the record, before I got to the bottom of this problem I

Help with Readlines error
238281 [phinsxiii@gm] I don't know if it is me or if something is wrong with Ruby.  I am
+ 238285 [kyleaschmitt] Well I could be crazy, but that looks like unicode to me.
+ 238424 [mshock@sh dr] There is nothing wrong: you are reading the data in Unicode, namely in

is_class from a String?
238291 [leandroico@g] I have a dynamic String entry and I want know if it represents some
238295 [cdcarter@gm ] => nil
+ 238298 [leandroico@g] But If Model doesn't exist I will get an error. =/
+ 238300 [leandroico@g] Yay!

Re: SimpleHTTP initial release
238292 [sgwong513@ho] very nice... I like it. :)
238303 [transfire@gm] Very nice. I think it may be almost capable enough to serve in place
238415 [romeda@gm il] Wonderful library! Fills nicely the gap between open-uri and

Problem changing datetime format
238301 [reedrob@gm i] I am trying to format some datetimes like this...2007, February the
238309 [Rob@Ag le on] (part of ActiveSupport)
238326 [reedrob@gm i] Thanks for that, I will repost on the rails group.

ruby-services -- unable to start fastri service
238304 [renard@nc rr] I have just done a complete new installation of ruby-services. I have
246803 [ mfp@ac .o g] I don't really know anything about ruby-services (or win32 for the matter),

[OT] Deployment options with Merb or Camping
238306 [has.sox@gm i] ...
+ 238314 [robby.lists@] We have several customers running Camping applications on our servers.
| 238315 [has.sox@gm i] ...
| 238317 [robby.lists@] All of our levels, you're constraints are memory, disk space, etc. Not
+ 238327 [james.britt@] I like Nitro when I don't need one or another feature of the Rails suite
+ 238335 [ezmobius@gm ] Daniel-
+ 238391 [cdcarter@gm ] Deploying camping applications is pretty simple with Evan Weaver's

Current State of Merb
238322 [has.sox@gm i] ...
238334 [ezmobius@gm ] Hey Daniel-
238343 [has.sox@gm i] I hope my comment did not come across as a critisism.  I did not mean
238390 [cdcarter@gm ] I just want to point out that Camping is almost never too simple.  I
+ 238395 [has.sox@gm i] Thanx for the heads up Chris.
+ 238400 [has.sox@gm i] I have a question on Camping Chris.  Can I use MySQL or only sqlite?
  238403 [cdcarter@gm ] You Can use MySQL with a postamble.

Help begin/rescue/ensure
238323 [configterm@g] I have this simple code.
+ 238350 [B.Candler@po] A bare "rescue" doesn't catch all exceptions, only those which are
| 238411 [djberg96@gm ] Given how often this issue appears on the mailing list, I'm beginning
| 238440 [B.Candler@po] Well, it would be very confusing if a rescue intended to catch an
+ 238352 [chris.hulan@] rescue without a specified exception defaults to StandardError.

libxml and Windows
238342 [cfis@sa ag x] About six months ago there was a post about libxml and Windows (see

playing defined system sounds
238351 [_nospam_seti] i'd like to play linux system sounds for my app events.
238435 [o.renaud@la ] There is no "system defined sounds" for every Linux installations, since there

soap complex type seen as nil
238359 [nappin713@ya] I can't figure out how to pass a complex type to a soap call.  I thought
314957 [mattias@on o] Did you solve this problem? I have something simular.
336656 [ruby@ev nf o] Any luck on this one?

Rubyforge.org question
238368 [peter@ru yr ] Is there a possibility to monitor everything on Rubyforge? (trackers,
238396 [gregory.t.br] Bug reports should (IIRC) get emailed to you automatically.
+ 238399 [flevour@gm i] You may setup something via the brand new http://pipes.yahoo.com/ and
| 238409 [robin@ni or ] Wow, that's only 0.000002 cents or 0.00000002 dollars.
+ 238408 [james@gr yp ] I'm pretty sure you have to set the trackers to email you.  This is
  238410 [djberg96@gm ] On Feb 9, 9:34 am, James Edward Gray II <j...@grayproductions.net>

Segmentation fault: Ruby 1.8.5 Under VC++ express 2005
238370 [zhimin.wen@g] Have anybody tried to compile the 1.8.5 code with VC++ express 2005
+ 238380 [halostatue@g] I haven't seen that, specifically, but I haven't tried in over a year
| 238426 [ml.chibbs@gm] ...
+ 238414 [zhimin.wen@g] I have manage to "bypass" the error.  The problem seems like whenever

File.open () Errno::ENOTDIR
238386 [Gilbert.Rebh] i have a problem with File.open =
238389 [B.Candler@po] string1 << string2

Finding help
238392 [technodolt@g] ...
+ 238393 [lukeivers@gm] And, I think I just figured it out... it's using a symbol to reference a
+ 238394 [cdcarter@gm ] The &: syntax is the famous Symbol#to_proc hack.  The & operator calls
| + 238401 [lukeivers@gm] Wow.
| + 238404 [lukeivers@gm] Is there a specific reason for this (it not being in core)?  It seems
|   238405 [flori@ni e. ] It's in 1.9.
|   238406 [lukeivers@gm] Much obliged.
+ 238398 [peter@ru yr ] It searches Ruby/Rails pages only (currently about 10.000 of them, and

[QUIZ] One-Liners (#113)
238413 [james@gr yp ] 1.  Please do not post any solutions or spoiler discussion for this quiz until
+ 238428 [robert.dober] ...
| 238429 [james@gr yp ] I don't have any tools.  Someone should build a test suite and post
| + 238434 [robert.dober] ...
| + 238442 [jamie.macey@] Okay.  The only one I'm taking significant liberties with is the
|   238444 [james@gr yp ] What if it's a file too big to read into memory?  ;)
+ 238436 [technodolt@g] ...
| 238437 [james@gr yp ] Either way is fine with me.
+ 238438 [technodolt@g] ...
| + 238439 [technodolt@g] ...
| + 238441 [james@gr yp ] Correct.
|   238575 [vorn@ni ht t] Not that there are any known positive numbers that are not wondrous...
|   + 238625 [robert.dober] ...
|   + 238627 [louis.j.scor] # Largely just to play around with rspec a bit.
+ 238643 [jamie.macey@] ...
+ 238651 [kbloom@gm il] #In all of this, +i+ is the input. Some solutions don't behave exactly the
+ 238657 [phillipsds@y] I liked this quiz. Bite sized pieces I could attempt between chasing
+ 238692 [alex@bl ck e] My solutions.  Be gentle, this is my first quiz :-)  I haven't checked
+ 238765 [technodolt@g] ...
  238797 [dontfall@gm ] I don't think my solutions contribute much that is new, but you can
  238852 [robert.dober] ...

Ruby on Pocket PC
238417 [mshock@sh dr] If anyone has a fresh compiled version of Ruby that runs normally on

passing html params in Ruby
238420 [jplantz@gm i] I have an AJAX page that I built.

nicer way to convert array of int to array of string
238430 [configterm@g] integer to array of string.  I'm sure there is more compact and nicer
+ 238431 [stefano.croc] stringArray=intArray.map{|i| i.to_s}
| 238433 [julesjacobs@] intArray.map(&:to_s)
+ 238432 [daniel.schie] [1, 2, 3, 4].map{|i| i.to_s } #=> ["1", "2", "3", "4"]

disabling DRbUndumped
238445 [ara.t.howard] anyone got a slick way of temporaily disabling DRbUndumped?
+ 238509 [pit@ca it in] Ara, can you tell us a bit more, probably via a testcase?
+ 238512 [drbrain@se m] Hrm, you'd need to move #_dump around to get this to work.  Since
| 238530 [ara.t.howard] i've just been doing
+ 238526 [ mfp@ac .o g] Strained, but works. It can be made thread-safe quite easily also.
  238531 [ara.t.howard] coming it at from the other direction - NICE!
  238565 [pit@ca it in] Ara, do you need to control this on the client or on the server? Per

Rake and rake aborted!  Rake aborted! undefined method `gem' for main:Object
238446 [peppermonkey] there must be some configuration mistake but can someone help me out?
+ 238451 [mguterl@gm i] ...
+ 238492 [gregory.t.br] yes, you need the latest version of rubygems.

Rake aborted!  undefined method `gem' for main:Object
238447 [peppermonkey] there must be some configuration mistake but can someone help me out?
+ 238456 [peppermonkey] seems the problem is not just with rake.
+ 238457 [johnwilger@g] You need to update to the latest version of Rake, I believe.
  238461 [johnwilger@g] Doh! I meant to say RubyGems. Update to the latest version of
  238464 [peppermonkey] Whoops. updated other stuff but forgot about updating gem's itself.

test errors on rake project (gem)
238448 [piergiuliano] I'm not sure this is meaningful or if it makes any sense, but just for

Re: One-Liners (#113)
238449 [gavin@re in ] Here are a few more test cases, both to help others and to be sure
238452 [cmshea@gm il] I changed anagrams to %w(tac cat act). I'm the sort of person that
+ 238453 [gavin@re in ] def test_commify( str )
+ 238455 [jamie.macey@] A kind of customary payment by a tenant; a word used in old records.
  238460 [gavin@re in ] s = 'your 80 char solution here'
  + 238470 [gavin@re in ] # Built-in classes for testing #4
  | 238471 [james@gr yp ] Technically those are constants, not classes.  For example, OpenSSL
  | 238472 [gavin@re in ] On Feb 9, 4:46 pm, James Edward Gray II <j...@grayproductions.net>
  | 238477 [james@gr yp ] My solution handles either.
  + 238478 [gavin@re in ] Some interesting edge cases, assuming that exactly 40 characters may

Re: Los Angeles area users group?
238454 [jgarvin.list] ...
238493 [collinsj@se ] Now it doesn't look like the site is even up... there wasn't really any
238495 [Fdavis@us an] I'm in LA also; there's a very active Perl user's group, but no Ruby
+ 238496 [michael.moen] Me too.
+ 238501 [rfenney@fe t] ...

The meaning of Benchmark's times
238458 [alex@bl ck e] I thought I understood what user and system times meant.  Then I saw
238517 [B.Candler@po] With webrick, the process is waiting for some external event.

Jumping to "the next one" in something#each
238459 [drosihn@gm i] ...
+ 238463 [ruby@ph li .] Well, if you don't mind trashing the array you're processing you could use
| 238467 [drosihn@gm i] ...
| + 238469 [drosihn@gm i] ...
| | + 238480 [gwtmp01@ma .] I think that using an array as a queue for processing items is
| | + 238482 [logancapaldo] require 'generator'
| + 238521 [B.Candler@po] Note that Array#sort *does* always generate a temp array.
| + 238532 [ara.t.howard] this pattern will work with most nearly any method
|   239069 [drosihn@gm i] ...
+ 238465 [gwtmp01@ma .] list = ARGV.dup   # leave ARGV alone
| 238468 [drosihn@gm i] ...
+ 238513 [nicolas.desp] ARGV.each_with_index { |arg, index|
+ 238528 [danfinnie@op] [1, 2, 3, 4, 5, 6].each_cons(2) {|current_item, next_item| p
+ 238538 [vjoel@pa h. ] The following works with any Enumerable, doesn't use threads,

drb object client - call and continue?
238474 [andy.koch@pc] I'm working on a script which calls to a drb object.  I'm wondering if
238476 [ara.t.howard] background = Thread.new{ drbobject.message }

[ANN Rinda::SQLiteSpace] [WAS] Re: TupleSpace performance (TupleBag really)
238475 [ara.t.howard] i have.  if people like it, i'll release next week.
+ 238485 [hutch@re ur ] What version/implementation of sqlite are you using?
| + 238486 [ara.t.howard] 1.3.1 - oops.
| + 238487 [ara.t.howard] ...
|   238523 [hutch@re ur ] Thanks.
+ 238510 [ mfp@ac .o g] It's pretty fast considering it's persistent, but it is of course slower than
  238529 [ara.t.howard] <snip bench>

Getting Time in specified timezone/offset
238481 [gethemant@gm] def to_time
238506 [mshock@sh dr] Good time-of-the-day! ;-)
238568 [apeiros@gm .] Won't do it :) The problem is, that we intend to actually replace stdlib

Go daddy problem
238484 [wbsmith83@gm] I am trying to deploy an app on godaddy but every time I create an app

nethttp memory leak on long-running daemon
238489 [sjoonk@gm il] I used nethttp library to my small program. My program is simple.
388709 [seveq@gm .d ] by exhuming this thread, sadly, I've got to inform you that I've
388710 [rogerpack200] I'm able to reproduce it.
388714 [drbrain@se m] Can either of you show code used to reproduce it and post to redmine?

[OT] the funniest thing ever
238500 [ara.t.howard] this was so dang funny i had to share it
+ 238502 [m_goldberg@a] That's really good. Thanks for sharing. I followed the link. I think
| 238802 [mortonda@dg ] I have to disagree with the paper a bit.  It seems that the author is
| + 238821 [richard.conr] OCaml gets a lot of attention mostly as a source of ideas for
| | 238919 [no@sp m. le ] That's funny. Coulda sworn that my Debian package listing contains
| | + 238921 [sonoflilit@g] ...
| | | 238952 [ara.t.howard] i don't think that's slowed rails down too much...  it's a big install too...
| | + 238926 [richard.conr] I didn't get enough time to itemise the OCaml library space. Apologies
| |   + 238932 [martindemell] Share and enjoy :)
| |   + 238933 [robert.dober] ...
| |   + 238953 [tim.pease@gm] And you have to love the Ruby community where an off-topic humor
| |   | 238962 [robert.dober] ...
| |   | 238985 [richard.conr] I think much of the recent interest is due to a lot of big OSS projects
| |   + 238954 [ara.t.howard] it's OT - but not __that__ OT.  here's why
| + 238839 [sonoflilit@g] ...
| | 238844 [ara.t.howard] especially since mod_ocaml is right here
| + 239147 [steven@lu os] Yes.
+ 238515 [dblack@wo bl] If it walks like an octopus....
+ 238570 [shortcutter@] Ara, thank you for sharing this - not only because of the funny quotes
+ 238944 [martindemell] my favourite quote from that article was lispnik Martin Rodgers's
  238955 [ara.t.howard] yeah - i though about stealing that one!

Ruby Tk: how to make something happen periodically?
238503 [arifsaha@gm ] In Ruby Tk, how to make something happen periodically, while the user
238505 [m_goldberg@a] Go to <http://rubykitchensink.ca/> and search on "tktimer".
238507 [m_goldberg@a] Let me recant on that. It's better to go to Google and search "ruby
239730 [arifsaha@gm ] Works like a charm, once I know the keyword, things went smoothly.
+ 239739 [m_goldberg@a] No, I'm sorry, but I don't know where the result of a block passed to
+ 239750 [nagai@ai ky ] Please try this.

[ANN] One-Click Ruby Installer for Windows: 185-22 Final
238508 [ml.chibbs@gm] ...

ENV['COLUMNS']
238514 [_nospam_seti] in irb I can have access to ENV['COLUMNS'] for the # of columns in the
+ 238516 [B.Candler@po] Nothing to do with ruby...
| 238518 [ljz@as as .c] Well, if that were the case, the variable wouldn't be visible within
| 238522 [B.Candler@po] brian@mappit:~$ irb1.8
| + 238525 [ljz@as as .c] Yes, it looks like the shell is not exporting those environment
| + 238604 [_nospam_seti] yes Brian, me too. I'm running the script in a terminal shell.
+ 238571 [akbarhome@gm] Because when you play with irb, it is clear that you use terminal/
| 238574 [_nospam_seti] sorry but that seems not to be a satisfactory explanation.
| 238578 [_nospam_seti] akbarhome, unless what you mean is: that info is not available because
+ 238607 [ryand-ruby@z] COLUMNS isn't exported. You shouldn't be able to see it within your
  239067 [steven@lu os] $ echo $COLUMNS
threads.html
top