182100-186126

181912-366789 subjects 182324-358441

utime: still with bug?
182100 [aaa.a99@df h] with ruby 1.8.4 on Windows XP, there seems still to be an error of 1
+ 182124 [Daniel.Berge] I think the bug is actually in Window's utime() implementation, based on
+ 182206 [ocean@m2 cc ] Sorry, this is regression I introduced when fixed another bug of stat(2) on WinNT.
  182223 [axel.friedri] Thank You! (I'm looking forward to get the "right" utime.)

drb Applications
182111 [reto-ruby-ta] Can anybody recommend an open source software which uses drb? It would
182126 [cribbsj@oa w] I use drb in KirbyBase (http://netpromi.com/kirbybase_ruby.html) to
182129 [ara.t.howard] ruby queue use a local drb server to do fork/exec jobs in another process.

Confusion Over Keyword Arguments
182116 [   no@no co ] Ruby 2.0 will include new syntax for hash literals: {a:3, b:4}. However,
+ 182118 [logancapaldo] Ruby doesn't have keyword arguments at all. When you call a method
| 182128 [   no@no co ] Keyword arguments aren't hashes.
+ 182144 [cohen.jeff@g] I am personally not in favor of allowing the : character instead of =>.
| + 182147 [mental@ry ia] Assignments are legal in most places that => is; would you want to
| | 182151 [cohen.jeff@g] h = { 'a' => 5, 'b' => 6 }
| | + 182154 [dblack@wo bl] No one said *illegal* assignments were allowed :-)
| | | 182159 [cohen.jeff@g] Phhhewwwwww - Man, has it been a long day.  Sorry for the brainfreeze.
| | + 182162 [mental@ry ia] Legal, not equivalent.
| + 182150 [dblack@wo bl] I don't think it's extra.  I would hate to have to parse -- visually
|   182155 [cohen.jeff@g] start_hockey_game(:home_team = "Chicago", :away_team = "Detroit")
+ 182175 [matz@ru y- a] No, on the virtual implementation (only inside of my brain), they are
  + 182181 [none@no e. e] We are running out of characters, could we instead switch to
  | 182183 [matz@ru y- a] Too late.  Perl6 took that place.
  | 182187 [mike@st k. a] Does Perl 6 exist yet?  (Yes I know Pugs exists, but Perl 6 seems to
  + 182186 [ news@ja .f ] If the keyword has to be unadorned, and this has to be done solely through
  | 182220 [adam.shelly@] How about using Pascal for inspiration? Keep both the : folks and the
  | 182264 [Daniel.Berge] That can be made to work, with the understanding that '=' in a method
  | + 182266 [ara.t.howard] but is
  | | + 182267 [Daniel.Berge] Second one.
  | | | 182271 [ara.t.howard] but that's a problem no?  number two is the same as this
  | | | 182277 [Daniel.Berge] No, then they become positional.  That's the same as foo 2, 5.
  | | + 182272 [dblack@wo bl] You may have to bite the bullet and dust off your parentheses keys :-)
  | |   182280 [cohen.jeff@g] I completely agree.  I kind of like the current technique of using an
  | + 182268 [james@gr yp ] assert_instance_of(Name, (name = Name.new( (first = "James"), (last =
  | | 182269 [Daniel.Berge] Or, maybe we should just stick with "=>" as a keyword operator, and
  | + 182281 [matz@ru y- a] I'm not sure if we _can_.  yacc is a tough guy to fight with.
  | | 182291 [Daniel.Berge] Error.  There's no 'foo' parameter.  Passing a literal hash would require {}.
  | | + 182295 [matz@ru y- a] I'm not sure what you meant by "literal hash".  Do you mean foo:3 is
  | | | 182299 [Daniel.Berge] Oops - I didn't notice you had declared it "*c" instead of "c".  My blog entry
  | | | 182328 [none@no e. e] I presume both this and the section before, Matz means
  | | + 182332 [none@no e. e] defined in
  | |   182336 [Daniel.Berge] Yes, I think this is one of the reasons we started leaning towards using
  | |   182342 [none@no e. e] Both problems should be fixed by mandating that there
  | + 182290 [srinivas.j@s] This has reference to the discussion in the article below.
  + 182215 [transfire@gm] I don't think anything works like ':' does --it has a divisor quality.

case/when question
182131 [cremes.devli] I was intrigued by the post that _why put up a few days/weeks ago
+ 182134 [james@gr yp ] Method definitions, unlike blocks, are not closures and do not have
+ 182135 [cremes.devli] Responding to my own email...
| 182140 [dblack@wo bl] Sort of :-)  Actually @r1 is an instance variable, not a class
+ 182136 [dblack@wo bl] You've defined r1 and r2 outside of the scope of the method definition

Where to put ruby.h?
182137 [byrnejb@ha t] I install ruby via a binary rpm, however I have a requirement to provide
182157 [drbrain@se m] ruby -rrbconfig -e 'puts Config::CONFIG["archdir"]'
182214 [byrnejb@ha t] Thank you.
182246 [byrnejb@ha t] After the light went on I installed the ruby-devel-1.8.4-1.c4.i386.rpm

Nuby - NEW case/when question
182149 [cremes.devli] I have a new question regarding _why's post [1].
182168 [dave.burt@gm] In the comment, he's talking about something different, not case/when

DSL blog
182152 [ptkwt@ar cn ] I've started to blog about re-visioning my RHDL DSL.  I'll post about how I've
+ 182178 [Bil.Kleb@NA ] Yes; Thanks,
+ 182182 [jim@we ri hh] I like it.  Can't wait for more entries.

[SOLUTION] Current Temperature (#68)
182156 [email55555@g] My one-line solution.

Newby question: Is += atomic for integers?
182158 [richard.j.co] Can the following program produce counts that are wrong?
+ 182160 [drbrain@se m] $ parse_tree_show -f
+ 182222 [minkoo.seo@g] Yes.
  + 182232 [bob.news@gm ] I strongly support that!  Always do proper synchronization even if a non
  + 182323 [mental@ry ia] And following from that, use as little shared state as possible

create folder ok delete not
182165 [michaelaugus] it works
182167 [michaelaugus] sorry never mind its so stupid I think I am tired

Re: Current Temperature (#68)
182169 [semmons99@gm] Semi-colons, that is so cheating. :-)
182229 [dave.m@em il] require("open-uri") && puts((ARGV.size !=1) ? "Usage: #$0 <zip code>": ("The
182326 [cohen.jeff@g] Or loss of profit to the original publisher.
182338 [chneukirchen] Now, let's consider screen-scraping really is "quoting".  With proper
182343 [cohen.jeff@g] Um, I don't know about that, actually.  You have to make sure you're not
182345 [chneukirchen] Let's sue Technorati! And Google Feeds!

Dynamic Object Instantiation
182172 [tdenkinger@g] ...
182180 [vjoel@pa h. ] If there is a way to map from the file name to the class name (in this
182452 [tdenkinger@g] ...

Re: Digest Articles 181864-182030 (17/17) (ruby-talk ML)
182176 [benjohn@fy h] ...
182226 [benjohn@fy h] ...

drb over udp
182177 [vjoel@pa h. ] Does anyone know of a working example of drb over UDP sockets? There
182191 [ara.t.howard] what are you trying to do?  i think i'd be quite interested too.  didn't romp
182205 [vjoel@pa h. ] No particular use right now. A few years ago I read that it was
182213 [ara.t.howard] me thinks you want to be checking out spread.  there are even ruby bindings.

March Ruby events in the SF Bay Area
182188 [rdm@cf l. om] Sadly, no South Bay Ruby events have been announced.  C'mon,

Re: Torn in two - Pythonist
182193 [cdunn2001@gm] ...

Re: RubyConf 2006, October 20-22, Denver!
182194 [hitesh.jasan] Rubyists in Denver, I'm looking forward to it!

const_missing oddity?
182197 [ptkwt@ar cn ] def Object.const_missing name
182198 [dblack@wo bl] That's what I would expect -- otherwise you'd have a situation where

Re: reasons to use else inside rescue
182199 [cdunn2001@gm] ...

Re: Intros to Python for Rubyists?
182201 [cdunn2001@gm] ...

cleaner Ruby in a rails view
182207 [petermichaux] I think this is a pure Ruby question. I seem to be writing this nested
+ 182210 [bauer.mail@g] You can make sure that item.cart_item_optional_values is always equal
| 182211 [petermichaux] is something like the following acceptable?
| 182245 [dblack@wo bl] If you get the right-hand side of that, it means the left-hand side
| 182250 [charlie@ca t] ...
| + 182253 [byrnejb@ha t] irb(main):001:0> a = nil
| | 182254 [byrnejb@ha t] a.to_a.each {|n| puts "The index is: #{a.to_a.index(n)}"}
| + 182256 [dblack@wo bl] Because it's not a container or iterator.
| | 182257 [charlie@ca t] ...
| | + 182260 [pertl@gm .o ] theoretically nil is no container...
| | + 182261 [james@gr yp ] You can, sure.  Whether or not it is a good idea is the question.  ;)
| |   + 182262 [dblack@wo bl] Yes, definitely.  Almost every time I get one of these "undefined
| |   + 182263 [charlie@ca t] ...
| |   + 182282 [bcully@gm il] In lisp, nil is the empty set, and can be enumerated in the standard
| |     + 182285 [pertl@gm .o ] full ack [++]
| |     + 182286 [dblack@wo bl] A bit of a conversation-stopper, but we'll just agree to disagree :-)
| |     | 182293 [pit@ca it in] IMO, if you have problems getting nil from a method that is supposed to
| |     + 182298 [matz@ru y- a] Which one behave more properly?  Lisp, or Objective-C?  Since they
| |       182304 [charlie@ca t] ...
| |       182308 [dblack@wo bl] Probably the best thing is to do whatever's necessary in the
| |       + 182310 [james@gr yp ] Bingo.  I think that's the perfect answer here.
| |       | 182313 [charlie@ca t] ...
| |       | + 182318 [desmarm@gm i] I think that David's plan is a good one.  I also think that his answer
| |       | + 182321 [dblack@wo bl] That doesn't say much for all the other answers :-)
| |       |   182325 [charlie@ca t] ...
| |       |   182331 [desmarm@gm i] You know, I don't much monitor the rails list but I think that maybe
| |       + 182330 [ed.howland@g] Just to illustrate a point about Rails, I had a similar problem. Some
| + 182388 [ssmoot@gm il] I think the "and-call" operator discussed recently would be a very very
+ 182212 [ara.t.howard] just return an empty array when 'cart_item_option_values' is nil
+ 182231 [pit@ca it in] arrays never are nil, so you can just remove the empty? test.
+ 182233 [chneukirchen] <% item.cart_item_option_values.to_a.each do |ov| %>
+ 182479 [sethrasmusse] <%= render :partial => 'foo', :collection =>
  182480 [sethrasmusse] Forgot to add that with the second example, you'd probably want an <%

Class method in singleton_methods?
182216 [minkoo.seo@g] irb(main):001:0> class Foo
182241 [dblack@wo bl] A class method is indeed a singleton method of a Class object.  The
+ 182242 [dblack@wo bl] The one way in which class methods differ from other singleton methods
+ 182613 [sam.s.kong@g] The visibility issue is quite confusing.
  182629 [dbatml@gm .d] p [self, self.ancestors] #=> [#<Class:C>, [Class, Module, Object, Kernel]]
  + 182659 [dblack@wo bl] But Object is always an ancestor, so you don't need step 2.  Also,
  | 182665 [dbatml@gm .d] Yes, but these are the steps that ruby (1.8.4) does when looking up the
  | 182668 [dblack@wo bl] I think I was misunderstanding the relation between your example and
  | 182673 [dbatml@gm .d] I used Object because the top-level X is stored in Object and I wanted to
  + 182790 [sam.s.kong@g] Yes. That helps a lot.

Re: Breaking Out Of A Loop
182225 [benjohn@fy h] ...
182307 [r.mark.volkm] I think you meant to say "parroted back" instead of "pirated back",

Informix driver for Ruby
182228 [gerardo.sant] I'm writing a Ruby extension for accessing an Informix database
182230 [john.wcl@gm ] Looking forward to using it with Rails (Waiting for your AR adapter ;)
186126 [gerardo.sant] It has been tested succesfully on Solaris 9/Informix 9.40/Rails 1.0.0

Write Fortran in Ruby
182234 [Bil.Kleb@NA ] A fun, but ultimately pointless exercise from the "Python
+ 182243 [dave@bu t. d] My Fortran's a little rusty (I never learnt it); does this program do the
| 182251 [dave@bu t. d] puts *i
| 182255 [ara.t.howard] program ii
| 182289 [dale.martens] In an attempt to make it look at close to the fortran and still run
| 182309 [dale.martens] I guess using a range is slightly better. I know, enough already. I
+ 182248 [Bil.Kleb@NA ] 36
+ 182265 [andy19191@fs] Your Fortran program is not legal since the value of i outside the loop
| 182284 [cdunn2001@gm] ...
| 182288 [ara.t.howard] i've never had a problem with this and am routinely process files ranging from
+ 182355 [ jupp@gm .d ] First of all there is no programming language calles "Fortran 77". The

[SUMMARY] Current Temperature (#68)
182240 [james@gr yp ] Obviously, this quiz is about fetching data from the Internet.  People went
182244 [uncledruby@g] ...
+ 182247 [email55555@g] Thanks James to point out legal issue.
| 182320 [leavengood@g] It was good of James to mention it in the summary, but in reality I
+ 182337 [chneukirchen] Yet is the web-service used total crap.  You should not be forced

Unix Shell
182252 [gjohnson@7s ] I'm new to RUBY, but am familar with other scripting languages, PHP,
+ 182258 [byrnejb@ha t] Try the Pickaxe book, the first edition is available on-line in pdf
+ 182259 [ruby@an hr p] } I'm new to RUBY, but am familar with other scripting languages, PHP,
  + 182275 [gjohnson@7s ] Thanks for the tips, they work like a charm.  Does anyone know why the
  | 182287 [aderobertis@] ...
  + 182392 [bob.news@gm ] There are plenty of other ways.

gsub problem
182270 [huseyinpolat] I have spend over 4 hours for this.. here is the question masters, very
+ 182273 [ksruby@gm il] $ irb
| + 182350 [huseyinpolat] Kent thank you very much,But I did that and I got
| + 182352 [huseyinpolat] Kent
+ 182274 [ara.t.howard] [1,2],[2,1],[3,1],[4,1]
| 182354 [huseyinpolat] thank you, however your first solution didn't make any difference and
+ 182276 [srinivas.j@s] Please try these.
| 182356 [huseyinpolat] thank you JS, however it didn'r change anything.
+ 182278 [jeem@hu he o] irb(main):035:0*  str="[1,2][2,1][3,1][4,1]"
+ 182279 [gk@cu co y. ] puts "[1,2][2,1][3,1][4,1]".gsub(/\]\[/, '],[')
+ 182333 [bluemonk@de ] str.split("][").join("],[") #=> "[1,2],[2,1],[3,1],[4,1]"
| 182357 [huseyinpolat] thank for post, but didn't change anything. maybe I should post my
| + 182359 [cyclists@nc ] Here's the output I get when I try Marco's solution. It looks right to me.
| | 182364 [mike@st k. a] irb(main):001:0> "[1,2][2,1][3,1][4,1]".gsub(/\]\[/, '],[')
| + 182386 [jeem@hu he o] Are your sure that the _input_ is what you think it is?
|   182397 [huseyinpolat] Dear Friends, thank you very much you all Jim, daesan, Mike, Timothy,
+ 182365 [daesan@gm il] (first problem)

Strange problem with rb-postgres
182292 [nicholas_wie] require 'postgres'
+ 182460 [probertm@gm ] I think this is the C extension, right?  I have the version last updated
+ 182462 [davelee.com@] I'll update the link and the rdocs to show that the published rdocs

Mutual require problem
182294 [renaud.delbr] I have a problem with the require method.
182322 [adam.shelly@] Circular requires are a bad thing.
182344 [none@no e. e] ..or, if possible, try to not have both files referencing
182395 [renaud.delbr] Thank you adam for your answers,
182403 [han.holl@gm ] ...

using testrb
182296 [info@ja eo a] My script _works_ but testrb is giving me some error messages. I've just come across unit testing yestarday so I'm quite new to this. What do these error messages mean and why does the script not run?
182302 [r.mark.volkm] It can't find a file to load named "ruby".

Process management and control
182300 [tim.hennekey] 1. Start a process/script
182316 [Daniel.Berge] Unfortunately, no.  Process is a module, not a class.  I think the

delete folder when files does not exist
182301 [michaelaugus] how to delete folder  only when files does not exis ?

Problem with Gserver
182303 [baswilbers@g] I have a problem with gserver.

Productcatalog and images with rails
182305 [64bitNOnoSPA] How should I make a productcatalog containing images with rails.

Rails: User-role based content
182306 [64bitNOnoSPA] Let's fx. say, that the content based on the front page (or any other
182311 [james_b@ne r] You will likely get a better, faster answer for Rails questions on the

Confused about != operator overloading
182314 [chrisgparker] I want to overload the != operator.  I can overload the == operator.  I
+ 182315 [lopexx@au og] != operator will use the == one
+ 182334 [pete@no ah t] Chris,
+ 182341 [logancapaldo] Is this fast enough?
  182446 [chrisgparker] Thanks for the replies everyone.

JRuby progress and the future
182317 [headius@he d] Sorry for the unsolicited promotion of JRuby and my own blog, but I
+ 182379 [sera@fh an .] Tim Bray mentioned that JRuby uses Java native threads to implement
| 182382 [headius@he d] That's a good question, Francis. I'm afraid no formal comparison of
+ 182394 [rblists@gm i] Thanks for the notice, I'll keep an eye on your blog.
  182430 [headius@he d] Ahh JSR 223. 223 is, at its core, a more feature-complete and
threads.html
top