312003-327176 subjects 312442-313772

^ [SUMMARY] Not So Random (#173)
312250 [matthew.moss] Apologies for the late summary... I'm moving to a new place today,
312383 [frederick.ch] It's worth noting that (when available) srand with no arguments will

^ Pagination for join table data
312256 [gani_chinta ] I have two tables one is departments and subjects

^ String
312257 [hema angleri] src_array = imgs.collect{|img| img.attributes["src"]}
312259 [jgabrielygal] As it explains in the documentation, it runs the block of code once for

^ Help test new ruby mail lib
312260 [mailing.mr g] I'm creating new ruby mail handling library that's actualy OO (Net::IMAP

^ DateTime in UTC
312265 [bcparanj gma] How do I extract the hour and minutes in UTC from a DateTime object? I
+ 312266 [AEtzold gmx.] What behaviour are you expecting ?
| 312306 [bcparanj gma] I created the following list of the expected behavior from
| 312307 [bcparanj gma] le.com/googlecalendar/event_publisher_guide.html
| 312308 [AEtzold gmx.] One of the two times is your local time zone (if it's +08:00, you'll most probably be in China, Malaysia, Singapore,
| 312321 [rick.denatal] And for most timezones, the utc offset depends also on the full time, since
| 312327 [bcparanj gma] st
| 312365 [AEtzold gmx.] You'll have to ask that on the Rails mailing list or test it out yourself.
+ 312269 [botp delmont] # >> d =3D DateTime.new(2008,8, 20, 12, 15)

^ Problem with text wrapping within the div
312267 [polawarkiran] All I am trying to wrap a longer text within the div. I am using
312270 [gethemant gm] This is not a forum for asking HTML/CSS/Javascript questions. There is a
312277 [polawarkiran] Thanks for the suggestion, But I think there are so may such quotes in
312283 [gregory.t.br] When someone politely reminds you that you are posting off-topic,

^ Nesting exception
312271 [sijo maxxion] I have the following code It is working I have no file named a
312272 [gethemant gm] Ignoring, whatever you are trying to do, your exception handling is
312273 [sijo maxxion] I tried
312275 [shortcutter ] First of all, you cannot use a symbol where you are using it as Hemant
312276 [sijo maxxion] Thanks for the reply  .The following is working and prints 'Also this

^ Re: restarts 1.0.2 Released
312274 [architbaweja] ter

^ Change/ignore XML encoding?
312281 [travisbell m] Hey guys,
312298 [matt tidbits] Could this just be a bug in Libxml? REXML seems to do the right thing...
312317 [rubytraining] Clearly libxml is expecting UTF-8, even though the XML file specifies
312324 [travisbell m] Heh, so is there a way around this aside from using REXML? Are we
312385 [matt tidbits] Well, if you really want to, I suppose you could parse the encoding info
312427 [travisbell m] Right on. For now I just switched to rexml and without any special
312491 [matt tidbits] Okay, but that helps no one since you didn't submit the bug. So I
312517 [erik hollens] Here's the link so the concerned can follow its status.

^ Not generating WSDL file when using actionwebservice?
312282 [varun.rajesh] I have a class that extends ActionWebService and is able to generate a

^ Saving the state of a Thread?
312286 [patrickli_20] Does anyone have any clever ideas on saving the state of a Thread?
+ 312289 [ibc aliax.ne] Not sure about what you mean. Maybe it would be useful for you the usage of=
| 312290 [patrickli_20] Mmm, that's not quite it.
| + 312293 [ara.t.howard] sure.  do it by hand using amalgalite.
| + 312295 [ibc aliax.ne] def initialize
|   312297 [patrickli_20] Thanks for the replies.
|   + 312300 [shortcutter ] I would not speak of the status of a thread.  Instead I would model this
|   | 312309 [patrickli_20] Thanks Robert for the input.
|   + 312574 [fox nscl.msu] Don't forget the state of a thread may also include the set of open
+ 312294 [shadowfirebi] Maybe you should think in terms of saving the state of the objects in a

^ Question on curses and ncurses
312287 [kenneth.m.mc] I'm using Ruby on OS X, which comes with ncurses. If I 'require
314697 [sentinel.200] I have started looking into curses and ncurses. The curses that comes

^ temporarily redefine the 'puts' command?
312288 [aidy.lewis g] Is it possible to temporarily redefine the 'puts' command?
+ 312291 [binary011010] Sure you can, that's one of the beautiful things about Ruby.
+ 312292 [dan fluentra] $ irb
+ 312296 [rubytraining] Here's some code, which should work for you.  Of course you'll have to
+ 312314 [reitinge in.] I would suggest to reassign $stdout instead.  This ensures that print,

^ ActionMailer,Templates (erb) and aweson_mail without Rails
312299 [paqs140482 g] I have  built an mail delivery system using Action Mailer, it works without
312304 [paqs140482 g] It must exist a "mailer" folder in "templates" path.

^ "A Quick Message"
312301 [perdics3 goo] Dear Member,

^ [ANN] expiration-date 1.0.0 (Stale Green Bacon)
312310 [tim.pease gm] expiration-date version 1.0.0
312353 [dmerrick ics] a neon

^ no such file to load -- dbi (LoadError) ?
312311 [laredotornad] I'm trying to run a ruby script from the command line (using version

^ trace-trees and the ruby intepreter
312318 [hikeeba1 gma] I just saw a recent article on ArsTechnica
+ 312395 [qaexls gmail] That was my reaction too. It makes me wonder what kind of
| 312798 [ryand-ruby z] Mostly that they're sitting on a very well engineered engine... The
+ 312785 [rogerpack200] I think JIT compilers for Ruby are pretty rare as of now.  Maybe Jruby

^ Error requiring action_mailer - "Text is not a module"
312320 [paqs140482 g] Does anyone have gotten this error?

^ md5sums/sha1sums for ftp sources
312326 [jayeola gmai] It seems as if there is an md5sum file to list the files in
312375 [hramrach cen] The md5sums are on http://www.ruby-lang.org/en/downloads/ for the link

^ gem install mechanize;  Windows
312332 [jtucker xoje] Um...
312399 [rogerpack200] Tried it on mingw--same results.  I'll ask about it.  gem install

^ remove_const, Kernel.load, and already instantiated objects
312334 [brentdilling] considers that an increase in knowledge == profit. :)
+ 312339 [martindemell] Not *that* messy - you basically walk the object space, marshal
+ 312340 [botp delmont] # ...
  312382 [brentdilling] Thanks for the replies!
  312410 [martindemell] Hm - if you're persisting to a database, what I'd recommend is
  312494 [brentdilling] Yeah, I guess that's the only remaining solution.
  312510 [erik hollens] Since it seems like you're trying to specialize the garbage collector,
  312511 [erik hollens] I should probably note that code in it's current state would keep

^ 1.9 tail-call optimization status?
312341 [tom.hurst cl] #define OPT_TAILCALL_OPTIMIZATION    0

^ How do I make an autonomous program?
312342 [raymondtjay ] First, I would like to ask you all to excuse a Ruby-newbie question.
312346 [adamtemporar] im a newb too so forgive me if my answer isnt what your looking for.
312347 [raymondtjay ] Well that sounds like what I'm looking for.  All I want to do is to be
312348 [martindemell] Bundles the ruby interpreter and your script together into a
+ 312350 [has.sox gmai] If it's just for a script on a *nix / mac machine then you can put this in
| 312359 [       m t.u] this still needs the ruby interpreter.
| 312369 [has.sox gmai] Yes it does.  But if your just after an executable that you can run on the
| 312372 [sepp2k googl] "All I want to do is to be  able to transfer the script onto another
| 312529 [davebass mus] Or maybe it does have Ruby installed, but an incompatible version
+ 312354 [raymondtjay ] Awesome, that worked out great thanks!

^ Interesting challenge - can it be done?
312343 [adamtemporar] an ongoing script regarding ebay i came up with a challenge though i
+ 312345 [martindemell] "machine learning" and "classification" are useful starting points
+ 312362 [transfire gm] keywords.each do |keyword|
  312403 [tim.pease gm] Use Lucene and/or Solr. They were build to do these kinds of queries.
  312478 [adamtemporar] Thank you both for your reccommendations. It does seem like a

^ gsub HELP
312344 [hema angleri] I am not Expert at Rails or Ruby

^ Serializable Continuations in Ruby
312349 [patrickli_20] Does anyone know if there are any plans for implementing serializable
312351 [martindemell] you'd be surprised at how pleasant a language scheme is to work with,
312355 [patrickli_20] I would be very very happy if that turns out to be true.
+ 312356 [martindemell] Hm - not sure. All I ask of an IDE is good autoindentation, and
+ 312397 [cmdicely gma] HtDP is designed to use Scheme to teach programming, not to teach

^ rake aborted problem
312352 [eric2323223 ] I am new to rails and when I am follow one the rails guide to create a

312357 [hema angleri] Posted via http://www.ruby-forum.com/.
+ 312363 [robert.dober] The . stays for any character, as such your regular expression seems
| 312367 [hema angleri] thanks a lot
+ 312377 [phlip2005 gm] How did you do with the >10 replies you got before? Did Hpricot work out?

^ [ANN] DoS vulnerability in REXML
312360 [shugo ruby-l] DoS vulenerabilitiy has been discovered in REXML.
312384 [james.britt ] To be clear: This is a Rails issue, not a general REXML issue?
312391 [cmdicely gma] But the versions it lists affected are Ruby versions, not Rails
+ 312400 [shyouhei rub] Want to name someone evil?  I'd vote this is an issue of XML itself.
+ 312411 [james.britt ] The original post said referred to "the REXML library used by Rails",
  312424 [shyouhei rub] Incidental yes, but that doesn't mean Rails users must be ignored.
  + 312428 [james.britt ] Not ignored, but the report should focus on the risk to any application
  + 312429 [gregory.t.br] But really, the case is "Any Ruby code parsing user passed XML", which
  | + 312430 [gregory.t.br] te that non-Rails apps can suffer this issue.
  | + 312432 [cmdicely gma] I don't think the monkeypatch has anything to do with Rails vs. Ruby,
  |   312433 [gregory.t.br] It has everything to do with Ruby vs. Rails.
  + 312431 [cmdicely gma] The notice on the ruby-lang.org includes the general workaround and

^ and here we've been wasting it on case statements
312361 [martindemell] ...

312364 [hema angleri] I am Trying To sort Out This Proble for the past 4 Hours..But
312366 [iwasinnamukn] Someone has already posted a possible solution in your last thread (less
312368 [hema angleri] No I wrogly posted

^ How do I iitialze this class?
312370 [jsnit jsnit.] When I try to initialize this class
312371 [stefano.croc] class Ticket

^ [QUIZ] Uptime Since... (#174)
312378 [matthew.moss] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+ 312622 [gthiesfeld g] # A windows solution.
+ 312635 [jgabrielygal] uptime = (`uptime`.match /up (.*),.*user/)[1].delete(" ")
| 312691 [jgabrielygal] (x,y)|
+ 312654 [jesse.d.merr] puts Time.now - File.read('/proc/uptime').match(/^(\d+\.\d+) /)[1].to_f
+ 312709 [fred lacave.] A solution tested with windows uptime.exe, FreeBSD and Linux.  It should
+ 312778 [adam.shelly ] Here's my Windows solution.  I offer it as an object lesson about why

^ Why 'if 0' succeeds in Ruby
312388 [phlip2005 gm] One of the first "gotchas" here coming from another language is 0 is not like
+ 312389 [davebass mus] But unfortunately Ruby regards both false and nil as not-true. For some
| + 312390 [jameskilton ] It's a perfectly fine feature and makes perfect sense if you
| + 312396 [dblack rubyp] They're not conflated, though. The two objects false and nil have in
| + 312446 [znmeb cesmai] Exactly! To make matters worse, Lisp "traditionally" treated nil as
| | + 312451 [charles.nutt] I tend to look at these things not from at the level of pedantic
| | | 312460 [phlip2005 gm] Exactly! a positively-written program should propagate value-objects, and
| | + 312453 [dblack rubyp] I understand what you're saying but I have a real, non-rhetorical
| | + 312492 [marick visib] Back in my Common Lisp days, some Lisper (George Carrette, I think)
| |   312498 [joost zeekat] Cheers,
| + 312471 [hongli phusi] I've found that treating both nil and false as false to be the correct
| + 312474 [apeiros gmx.] They aren't conflated. nil != false in ruby, but nil and false have the
| + 312519 [       m t.u] I agree with you. I am also used to this. nil should never == true, and
|   + 312523 [apeiros gmx.] Well, I suggest you actually try the expression 'nil == false' in irb.
|   | 312527 [phlip2005 gm] And he covered that in his examples. He was using == false as a shortcut to say
|   | 312530 [       m t.u] thank you :)
|   + 312526 [phlip2005 gm] Code style should prefer the if condition to pass in positive and happy-path
|   + 312535 [cmdicely gma] Every *comparison* with nil (except with itself) does fail.
|     312536 [phlip2005 gm] For the second time so far: His statement is jargon, and is not to be taken
|     312543 [cmdicely gma] It wasn't "jargon", it was simply imprecise. But that's not the issue;
+ 312394 [phlip2005 gm] if agent.index('googlebot')

^ ANSICode Regexp?
312392 [transfire gm] Can anyone give me a Regexp to match ANSIcodes.
312393 [transfire gm] Gad. A soon as I post, I figure out my mistake. I'nt that just the way

^ Until method.is_called?
312398 [tmcdowell gm] is there a way to settup an until loop 'until' a method is called? Is it
+ 312408 [tmcdowell gm] Sorry about my previous post, both my brain and shift keys were wacking
+ 312409 [farrel.lifso] Have a look at the Observable module in the standard library.

^ Open file, get first line, delete first line close file
312401 [thedickster ] Hey, i'm trying to open a file, get the first line of the file, delete
+ 312421 [dlb.id.au gm] Simplest thing is to get it into memory like you did with readlines
| 312423 [thedickster ] That is one option...the reason i need to be able to delete lines, is
| + 312425 [thedickster ] Its gross but it works
| | 312475 [dlb.id.au gm] I don't know if it's all that gross.  I have feeling this is
| + 312641 [ruby thomasz] I suggest exploring a distributed worker system like Rinda,
|   312660 [thedickster ] I've set it up with a rake task and a cron job, that re-runs every 5hrs
|   312662 [erik hollens] If the file is exceptionally large, you can save a lot of memory (and
|   312793 [dlb.id.au gm] Just on the "f2 << f.read" part, isn't this still reading the rest of
+ 312513 [erik hollens] tail +2 the_file > the_new_file
  312521 [davebass mus] And sometimes the problems are not with the program but with the data
  312562 [erik hollens] I don't think this is actually true, can you explain further?
  + 312587 [Rob AgileCon] You can just truncate the file size.  You don't have any subsequent
  | 312597 [erik hollens] How do you know which line is the last line?
  | 312600 [Rob AgileCon] Well, if you want/need the last line(s) of a file (presumably text or
  | 312604 [erik hollens] You are talking about `tail -f`. This is different.
  + 312624 [davebass mus] My Ruby isn't up to coding it, but in principle I'd seek to the end of

^ Re: ruby wish list/musings
312402 [rogerpack200] Are there any existing projects out there like these:?
+ 312449 [ninja slapha] No, that would actually backfire in a big way, I think. Rails being in Ruby
+ 312518 [erik hollens] I bet if there's enough interest, making initial headway on the project
+ 312820 [rogerpack200] def a
  313557 [rogerpack200] Currently we have
  313561 [dblack rubyp] Do you think you could start new threads, with relevant subject lines,

^ YAML::load help
312405 [williams.jay] I have a hash of Structs that I am trying to save and load to a file
+ 312412 [vjoel path.b] What's different between var and the original hash?
+ 312413 [ibc aliax.ne] Difficult to help you if you don't specify and show which are the differenc=
+ 312414 [dlb.id.au gm] What do you get when you call to_yaml on your struct ('ss' is a struct
+ 312415 [phlip2005 gm] Try File.read
| 312416 [vjoel path.b] It should work with File.open, too.
+ 312417 [williams.jay] The difference between the original hash and the hash loaded from the
  312419 [vjoel path.b] Looks ok as far as I can reconstruct what you're doing (using
  312420 [williams.jay] Thanks Joel,
  312434 [vjoel path.b] irb(main):008:0> Struct.new(:x,:y) == Struct.new(:x,:y)

^ Flickraw - I need help to install it
312407 [jorge consul] I was using it (v0-4-2) without any inconvenient but, a couple of weeks

^ Class_eval vs. reopening class
312418 [todd browser] I asked a similar question to this in the Rails forum, but it's pretty
312426 [todd browser] The only other difference I can find is that if the class doesn't
312448 [ninja slapha] More accurately, if the class doesn't previously exist, trying to access it
312472 [todd browser] Thanks, David for your reply.  I kind of expected there was some magic

^ Array.shuffle/Array.shuffle!
312435 [jcmoore pres] This works but I can't escape the nagging sense that there's a more
+ 312437 [TimHunter nc] ary2 = ary.sort_by { rand }
| 312439 [jcmoore pres] "Gone in 60 seconds"...
+ 312476 [apeiros gmx.] If you need a less predictable one than the sort_by { rand } then I
  + 312497 [fophillips f] Rehearsal -------------------------------------------------------
  + 312725 [jcmoore pres] Ah! If only the Ubuntu/Debian promotion cycle for Ruby out paced
    312770 [vjoel path.b] I heard the 9.04 release will be called Galloping Gondwanaland.
    317285 [lahgyk gmail] No, 'I' is next in line. "Irresponsible Irmin"

^ How to create a block consisting of multiple lines.
312441 [neeraj.jsr g] This works.
+ 312443 [keeperotphon] class Person
+ 312444 [vjoel path.b] do..end and {..} have different precedence. Your multiline example