353914-357801 subjects 354386-355297

problem opening the time class
354191 [cshupp1@ya o] All,
354258 [xenogenesis@] As the error status, there is no Time::ZoneOffset constant....
354406 [cshupp1@ya o] pharrington,
354414 [b.candler@po] => true

[OT] Happy new Year
354195 [ralf.mueller] to all of you from germany!
+ 354205 [rubynewbee@g] Me second.
+ 354213 [pg@th mi n. ] Yeah. Happy New Year, everyone.
+ 354244 [mike@os n. r] Greetings from Ukraine, may all of us be healthy and joyful!

Getting Started w Ruby on MacOSX -- ri/RDoc error
354197 [remillard@gm] I've done some poking around and haven't yet found a satisfactory
+ 354199 [remillard@gm] I did finally figure it out so I will document the answer here in case
| 355075 [aaron.broad@] Just wanted to let you know you helped someone.  Ran into the exact same
+ 354267 [ryand-ruby@z] Did you install the docs?

send emails
354206 [rubynewbee@g] I need a module for sending emails.
+ 354209 [derekbellner] Have fun!
| + 354211 [sophrinix@gm] Take a look at tmail also.
| + 354212 [ayumu.aizawa] You can also use ActionMailer.
| | 354214 [sophrinix@gm] ActionMailer uses tmail :-)
| + 354218 [rubynewbee@g] Thanks, that works.
|   354220 [pg@th mi n. ] Because it the #start method was written that way. ;)
|   354222 [rubynewbee@g] Thanks Phillip.
|   354223 [pg@th mi n. ] It's not much different than that.
|   354239 [rubynewbee@g] Thanks.
+ 354215 [ehsanul_g3@h] ...

doubts about variables in ruby
354208 [andre.rosa36] I want to make a ruby program that number in a URL and checks if the url
354210 [xenogenesis@] gets() retains the newline when the user presses enter

[FXRuby]problem creating widget inside a tab label
354217 [usurffx@gm i] I want to add a "close this tab" button inside an FXTabItem, but

Ruby & IRC
354233 [devguy.ca@gm] messaging, what are some good Ruby gems? Does anyone have experience
+ 354234 [jan.h.xie@gm] If you mean irc bot, try git://github.com/RISCfuture/autumn.git
| 354236 [devguy.ca@gm] basically I want to be able to send and read IRC channel messages,
| + 354237 [  sim@me co ] I tried Autumn but seems it is not compatible with latest gems.
| | 354240 [devguy.ca@gm] ok that is a neat trick, I'm just getting into IRC stuff, can you point
| | 354242 [  sim@me co ] ...
| | 354245 [devguy.ca@gm] Simone this is cool thanks!
| + 354238 [pg@th mi n. ] Since an IRC bot pretty much has to be able to read/write to an IRC
|   354243 [devguy.ca@gm] you know what I meant =) I am just looking for a simple clean interface
+ 354241 [martindemell] i've been pleasantly impressed with rif
| 354246 [devguy.ca@gm] Martin, thanks for that info on the gem. I notice ruby-irc only has a
| + 354247 [pg@th mi n. ] Check the sources for it, and see if the code's commented. If it is, the
| + 354320 [martindemell] That seems to be all, but I found it easy enough to get up and running
+ 354316 [spiralofhope] Also, if you want to hack around with an existing ruby IRC program, you
+ 354322 [denis.defrey] messaging, what are some good Ruby gems? Does anyone have experience =
  354332 [b.candler@po] (Jabber), then there's xmpp4r

yield self if block_given?
354248 [rubynewbee@g] class AngstyNamedPerson
+ 354249 [rubynewbee@g] I tried below, it can work,
| 354250 [ayumu.aizawa] Yes it does.
+ 354269 [lists@be tr ] I would like to tell it superfluous as in all regular cases the

[ANN] MountainWest RubyConf Proposal Deadline Extended
354259 [blowmage@gm ] We decided to extend the deadline for MWRC 2010 proposals by a couple days.

[ANN] mongrel_service 0.4.beta2 Released
354264 [luislavena@g] mongrel_service version 0.4.beta2 has been released!

"Dummy" IO object to push and pull data?
354265 [gohegdeh@co ] I'm relatively new to advanced Ruby programming, and I seem to be in
+ 354266 [ryand-ruby@z] ri StringIO
| 354273 [gohegdeh@co ] objectA = StringIO.new("")
| + 354276 [sophrinix@gm] Depending on your application, fakefs might be worth while.
| + 354291 [shortcutter@] If your scenario is such that for any particular thread you are always
| + 354303 [b.candler@po] Ah, then you want something with a real underlying O/S file descriptor.
|   354308 [b.candler@po] Oh, and there is also IO.pipe, which is unidirectional under most Unix
|   354309 [gohegdeh@co ] I've tried pipes, but it seems to always think there's data to be read.
|   354311 [vikkous@gm i] My recollection is that on windows, select only works on sockets. It
|   354352 [gohegdeh@co ] To make sure that I've been using it right, select is supposed to check
|   + 354353 [vikkous@gm i] It returns an _array_ of arrays of ready file handles.
|   + 354354 [tony@me io .] I'd again ask if you're trying to do I/O or thread synchronization here.  It
|     354358 [gohegdeh@co ] Well, it seems the problem is primarily occuring with Open3.popen3
|     + 354383 [b.candler@po] Sorry, I've read that several times and I still don't understand. Can
|     | 354402 [gohegdeh@co ] My apologies: I'll see if I can elaborate a bit...
|     | + 354403 [gohegdeh@co ] Hm, let me give an example of what this would output. The process that
|     | + 354404 [b.candler@po] Perhaps it would be helpful to distinguish symptoms from your assumed
|     | | 354408 [gohegdeh@co ] I've actually tried these myself; it doesn't get past the stdin.puts
|     | | 354415 [gohegdeh@co ] # Required support, go to process dir
|     | | 354429 [b.candler@po] But that message never appears in the output you showed - and this line
|     | | 354434 [gohegdeh@co ] Then nothing else happens. I'm 90% sure this is because Windows, being
|     | | + 354438 [b.candler@po] It returns you to a command prompt? How odd.
|     | | | 354439 [gohegdeh@co ] Oh, my apologies, I had put the user info there to show that I was
|     | | | 354451 [b.candler@po] OK. I've now got a Windows XP box beside me. I tried the threaded
|     | | | 354466 [gohegdeh@co ] Ah, that'd be it. Everything works fine now - Thank you all for your
|     | | + 354460 [shortcutter@] Actually part of that functionality is in Ruby itself because IO uses
|     | |   354463 [b.candler@po] I agree that's a good idea, but I don't think it actually makes a
|     | + 354428 [vikkous@gm i] Ah, that's right. On windows, there's a special method you have to use
|     | | 354431 [vikkous@gm i] Except when I actually read the msdn link above, I see it only works
|     | + 354454 [shortcutter@] That can't normally be, because the thread runs independently of the
|     |   354457 [b.candler@po] He's right, and I have replicated the problem. It occurs with with 1.8.6
|     |   354458 [pg@th mi n. ] PS C:\Scripts> ruby -v
|     + 354396 [shortcutter@] I gave an example using Queue (also a tool for thread synchronization)
+ 354279 [gohegdeh@co ] I've been using a workaround that seems to work fine, but certainly
+ 354310 [tony@me io .] If this is all just for thread synchronization, you shouldn't be using IO

Rounding float in ruby via .round
354268 [shevegen@li ] .round does not want arguments. Is there a reason why not?
354270 [pg@th mi n. ] Hmmm..
+ 354271 [xenogenesis@] <=3D 1.8.7
| + 354272 [marnen@ma ne] It shouldn't be too hard to write that behavior into 1.8.7...
| + 354280 [phrogz@ma .c] if Float.instance_method(:round).arity =3D=3D 0
|   + 354281 [phrogz@ma .c] Note that this gives you a Float as the result, which you may need to
|   + 354282 [phrogz@ma .c] Bah, should have tested. Of course the original round returns a
+ 354293 [colinb2r@go ] I didn't know 1.9 had extended Float#round. That's useful. Thank you

A problem while using RadRails to debug
354278 [lxybhbh@gm i] I met a problem while using Aptana RadRails to debug a program.

how to access something within an array
354284 [rupert@pe kl] I have this array...
+ 354286 [marnen@ma ne] That array contains one entry, a Yahoo::GeoPlanet::Place object.
| 354290 [anoiaque@gm ] You should have an accessor , try  : geo_planet_object.woe_id .
| 354300 [marnen@ma ne] But don't.  Introspection is dangerous in this case, and should not be
+ 354301 [b.candler@po] thing = arr.first
| 354305 [marnen@ma ne] Good point, although that's not terribly reliable if method_missing
+ 354317 [josh.cheek@g] It appears the object has a reader for woe_id (based on

Re: Happy new Year
354285 [sureshkkgvr@] Happy New Year to every one.

354287 [rubynewbee@g] please see the code below, why passing a block to a function then call
354292 [shortcutter@] Because, as the error message says, this is not valid Ruby syntax.  You
354295 [rubynewbee@g] thanks.
354296 [jeffpeng@ne ] An incoming code block will be converted into a Proc object and bound

[ANN] posix_mq - POSIX message queues for Ruby
354289 [normalperson] POSIX message queues allow local processes to exchange data in the form

can't understand for this each
354294 [rubynewbee@g] Please take a look at below.
+ 354297 [josh.cheek@g] An English translation might read "For each key value pair in the hash, add
+ 354298 [lists@be tr ] `Hash#each' is not `Array#each'. It is descibed in
+ 354302 [b.candler@po] Would it help if you think of it as "self.each" ?
  354315 [rubynewbee@g] oops that's right.

Is it possible to redirect $stderr to a Logger isntance?
354306 [ibc@al ax ne] Logger, SyslogLogger, Logging)?
354307 [tim.pease@gm] instance (as=20
354388 [ibc@al ax ne] we

[ANN] Mail 1.5.0
354312 [raasdnil@gm ] Mail has been screaming along in development over the past month.

[ANN] gem_file_conflict_checker (0.2.1) -- clean 'em up
354313 [rogerpack200] Pleased to announced the initial release of the

[ANN] rdp-arguments -- named arguments for 1.8 and 1.9!
354314 [rogerpack200] Though I can't take much credit for this (the original author is maca
354318 [m.fellinger@] The README is wrong about install, github doesn't build gems anymore,

[ANN] posix_mq 0.2.0 - notify fix + FreeBSD support
354319 [normalperson] POSIX message queues allow local processes to exchange data in the form

use ruby for what?
354321 [rubynewbee@g] May I ask, what jobs are you using ruby for?
+ 354323 [jeanjulien.f] Well, on my part, I mainly use it for scripting purpose: updating part
+ 354324 [mo_mail@on h] Lots of data processing, quick proof-of-concept work, enterprise
+ 354326 [pg@th mi n. ] Prototyping, I've written a desktop app in it (a proper one, too!),
| 354330 [uwe@ku os h.] We use Ruby (mostly JRuby) for
+ 354331 [shortcutter@] I use it for automation tasks which are too complex for Bourne Shell
+ 354333 [lists@be tr ] Some years ago I even saw an /sbin/init (pid=1) written in Ruby.
+ 354335 [jason.trebil] Well, if'n you build it, then someone has to test it.  And where I work, we use Watir (Web Application Testing in Ruby). http://watir.com/
+ 354356 [phrogz@ma .c] * Web Dev using Ramaze (my sites) and Sinatra (on Heroku).
+ 354376 [dido.sevilla] I have several distributed applications and network servers based on
+ 354389 [zigzag.chen@] #1. Rails for webdev

[Ruby Appliance] Status update
354325 [pg@th mi n. ] A (very slightly edited) post can be found on my blog, too. [0]

please find this problem
354327 [ashok.bhanda] Address already in use - bind(2) (Errno::EADDRINUSE)
+ 354328 [jeffpeng@ne ] That means a socket can't bind to an address/port.
| 354329 [jeffpeng@ne ] sorry forgot to mention, this happens due to the address/port have been
+ 354447 [superxain@gm] You may have started another mongrel / web server on the same ip:port

Few clarifications on recursion
354334 [atma@co va e] ...
+ 354337 [jeanjulien.f] I've tested the code works fine.
+ 354338 [josh.cheek@g] In Ruby, the last line of a function is returned. In this case, the last
| 354340 [atma@co va e] ...
| + 354341 [pg@th mi n. ] Depends on what was thrown into it, and what was done to it in the
| + 354350 [hutch-lists@] <http://se.inf.ethz.ch/people/meyer/down/touch/index.html>
+ 354339 [pg@th mi n. ] In a nutshell, recursion means performing the same action until a
  354342 [shortcutter@] Actually that description is true for loops (aka iterations) as well.
  354344 [pg@th mi n. ] The actual difference is: recursion gives me headaches, iteration
  354345 [b.candler@po] But while this particular example is one which can easily be written

Ruby in Lisp, preLisp
354336 [rulilupy@gm ] Lisp,
+ 354343 [shortcutter@] I am sorry, yes.
| 354417 [hramrach@ce ] While it does not necessarily improve performance it may improve
| 354531 [headius@he d] As someone who's been working on a Ruby impl for the past 4 years, I
| 354583 [albertschlef] Can you give one or two examples (for an edge-case)?
| 354586 [ryand-ruby@z] A few easy ones off the top of my head are Array#pack, String#unpack, =
+ 354426 [ninja@sl ph ] That would speed up that specific example, but I don't think you could do it

Re: Status update
354346 [b.candler@po] It would be interesting if you have a clean upgrade solution: that is, I
+ 354362 [pg@th mi n. ] I'll include that in our not-quite-ready-for-the-public-yet wiki as
| 354413 [b.candler@po] Everything within the VM image: the O/S, the ruby version, the gems,
| 354422 [walton@vy er] A teaching tool is exactly what this is aimed at. While we have talked
| 354481 [rogerpack200] ubuntu
| 354482 [aldric@tr vo] For any and all kinds of suggestions on what to include, please head to
+ 354409 [aldric@tr vo] I would note that Phillip's original purpose for this VM is actually for

A small internationalization issue?
354347 [hypermeister] I am a Puerto Rican using Ruby, so the apps I develop are mostly in
354349 [gregory.t.br] What version of Ruby are you running?   What encoding are your files
354357 [hypermeister] windows 7.  I use the scite text editor included with that ruby
354405 [gregory.t.br] If you're using Ruby 1.8.6, be sure to set $KCODE="U"
354839 [hypermeister] you said, but it didn't work either.  I still see incorrect characters.
354849 [gregory.t.br] at

[ANN] Prawn 0.7
354348 [gregory.t.br] [This announcement is about Prawn, a totally sweet pure ruby PDF

[ANN] sunaku's Ruby wmiirc - YAML imports
354351 [sunaku@gm il] This is a Ruby[1] and YAML[2] based configuration of the wmii[3]

RSS and images
354355 [galtenbergs@] Using the default Ruby RSS parser, which format is best suited to
354401 [kou@co mi ng] rss20 = RSS::Parser.parse(rss20_xml)
354421 [galtenbergs@] Thanks for the reply back.
354456 [kou@co mi ng] 'channel' is for <channel> not <item>.

Re: rdp-arguments -- named arguments for 1.8 and 1.9!
354359 [rogerpack200] oops my bad.

bitwise shift help
354360 [kvetch@gm il] way to determine if a bit is set in a number. For example,
+ 354361 [kvetch@gm il] Actually I suppose the bit check should read
| + 354363 [a99.googlegr] Fixnum[n]
| + 354372 [vikkous@gm i] There's nonzero?, which ought to be a tad faster than >=1. So, write
|   354440 [kvetch@gm il] Awesome thank you Caleb and Axel.
+ 354444 [lists@be tr ] As in SQL, 0 does not yield false. SQL's NULL is different from

undefined method `conf' for IRB:Module
354365 [rheluani@gm ] my ruby installation. I posted in the Dradis forums but noone answered,
354366 [pg@th mi n. ] Not necessarily a broken Ruby install, but it could be that SVN HEAD is
354373 [rheluani@gm ] Thanks for your prompt answer, Actually I had the same problem with
354374 [pg@th mi n. ] A happy accident. :)
354423 [rheluani@gm ] It'll take me some time to move things to 1.8.6, but I'll try that in a
354424 [pg@th mi n. ] Apparently. But the Dradis developers are probably more knowledgeable

[ANN] Ron 0.1.2 Released
354367 [vikkous@gm i] Ron version 0.1.2 has been released!
354890 [joelvanderwe] The use of Class#- is very nice and tidy!

[ANN] Sequence 0.2.3 Released
354368 [vikkous@gm i] Sequence version 0.2.3 has been released!

[ANN] Reg 0.4.8 Released
354369 [vikkous@gm i] Reg version 0.4.8 has been released!

[ANN] RubyLexer 0.7.7 Released
354370 [vikkous@gm i] RubyLexer version 0.7.7 has been released!

[ANN] RedParse 0.8.4 Released
354371 [vikkous@gm i] RedParse version 0.8.4 has been released!

how to capture all conditions using regex
354375 [rubynewbee@g] irb(main):001:0> x="123 456 789"
+ 354377 [rubytalk@ch ] The regex itself seems okay...
+ 354378 [jeanjulien.f] 123
+ 354379 [jgabrielygal] irb(main):001:0> x=3D"123 456 789"
  354380 [rubynewbee@g] Thanks all for the quick response.
  354397 [shortcutter@] Note that even with #scan you have two options: you can either take the

Is ruby's regex slower?
354381 [rubynewbee@g] comparison. :-)
+ 354382 [ayumu.aizawa] Its interested ;)
| + 354385 [rubynewbee@g] Thanks for the reminding, I got your meanings.
| | 354398 [shortcutter@] "Compiling" regular expression does not bring any advantages.  In fact,
| + 354390 [w_a_x_man@ya] regex = /href="http:\/\/(.*?)\/.*" target="_blank"/
|   354416 [rilindo@gm i] Wait, you are parsing HTML with regex?
|   354437 [kyleaschmitt] Thank you.  It's been far too long since I've read Coding Horror.
+ 354384 [josh.cheek@g] It seems like most of the time would be spent loading the environment and
  354387 [wybo@se va y] #!/usr/bin/ruby
  354433 [rogerpack200] You could try ruby 1.9 and see if it helps the speed.
  + 354435 [marnen@ma ne] Better yet, there's Oniguruma.
  + 354448 [murphy@ru yc] not very.
  | 354453 [marnen@ma ne] I think that's only done when study is called, but I could be wrong.
  | + 354455 [murphy@ru yc] You can improve it then :)
  | + 354461 [shortcutter@] The question is: does it matter for most practical purposes - and: do
  |   + 354476 [marnen@ma ne] No.  That's why I haven't learned Python yet, although between the speed
  |   | + 354478 [rogerpack200] Yeah no kidding.  Somehow speed just hasn't "felt" like the ruby
  |   | + 354532 [headius@he d] Unfortunately, the Python community seems to turn to "write it in C" a
  |   | | 354550 [marnen@ma ne] Devil's advocate: *is* Ruby the right tool the job for thoses cases?
  |   | | 354593 [shortcutter@] Before you can make that judgement you need to find out the reason for
  |   | | 354599 [jeffpeng@ne ] I have sounded many guys talking about the flawed design when they
  |   | | + 354602 [shortcutter@] I'm sorry, I really don't understand how your reply relates to my
  |   | | + 354632 [jose.halesga] ...
  |   | + 354533 [shortcutter@] Well, 1.9 *has been* improved dramatically in the area of performance
  |   + 354508 [albertschlef] Why does everybody say that CPUs are fast nowadays and that "it dosn't
  |     + 354511 [wyhaines@gm ] That's such a red herring that I'm not even sure how to address it.
  |     | 354512 [jeffpeng@ne ] Those show the statistics for a small application IMO.
  |     | + 354516 [wyhaines@gm ] Sure.
  |     | + 354537 [phrogz@ma .c] 200 million page views a day is an average of 2,300 page views a
  |     + 354524 [pg@th mi n. ] I have a Core2Dual, with each core clocking in at 2GHz. This is a
  |     + 354535 [shortcutter@] Dunno about everybody else.  I did not
  + 354628 [rogerpack200] You could also try
    354730 [headius@he d] And --server, and as recent a JVM version as you can get :)