182172-186126

181981-192078 subjects 182407-187145

^ Dynamic Object Instantiation
182172 [tdenkinger g] I'm sure this question has been asked and answered in the past, but googlin=
182180 [vjoel path.b] If there is a way to map from the file name to the class name (in this
182452 [tdenkinger g] Which also helps.

^ Re: Digest Articles 181864-182030 (17/17) (ruby-talk ML)
182176 [benjohn fysh] charset=US-ASCII;
182226 [benjohn fysh] ...

^ drb over udp
182177 [vjoel path.b] 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 path.b] 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 cfcl.com] Sadly, no South Bay Ruby events have been announced.  C'mon,

^ Re: Torn in two - Pythonist
182193 [cdunn2001 gm] I'm a recent convert myself. I was convinced by this blog that I found via

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

^ const_missing oddity?
182197 [ptkwt aracne] def Object.const_missing name
182198 [dblack wobbl] That's what I would expect -- otherwise you'd have a situation where

^ Re: reasons to use else inside rescue
182199 [cdunn2001 gm] I suppose a difference is that if "do_more_stuff" raises an exception,

^ Re: Intros to Python for Rubyists?
182201 [cdunn2001 gm] A really easy-to-read tutorial, with nice fonts and colors, is (at a fast

^ 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 wobbl] If you get the right-hand side of that, it means the left-hand side
| 182250 [charlie cast] As a side thought. Why doesn't the nil class have an each method that
| + 182253 [byrnejb hart] irb(main):001:0> a = nil
| | 182254 [byrnejb hart] a.to_a.each {|n| puts "The index is: #{a.to_a.index(n)}"}
| + 182256 [dblack wobbl] Because it's not a container or iterator.
| | 182257 [charlie cast] I know this is the ruby list and not the rails list but it would be nice
| | + 182260 [pertl gmx.or] theoretically nil is no container...
| | + 182261 [james graypr] You can, sure.  Whether or not it is a good idea is the question.  ;)
| |   + 182262 [dblack wobbl] Yes, definitely.  Almost every time I get one of these "undefined
| |   + 182263 [charlie cast] I'm not so sure.  I've been using perls Template-Toolkit for the last
| |   + 182282 [bcully gmail] In lisp, nil is the empty set, and can be enumerated in the standard
| |     + 182285 [pertl gmx.or] full ack [++]
| |     + 182286 [dblack wobbl] A bit of a conversation-stopper, but we'll just agree to disagree :-)
| |     | 182293 [pit capitain] IMO, if you have problems getting nil from a method that is supposed to
| |     + 182298 [matz ruby-la] Which one behave more properly?  Lisp, or Objective-C?  Since they
| |       182304 [charlie cast] The only time this nil problem occurs for me is with rails views.  With
| |       182308 [dblack wobbl] Probably the best thing is to do whatever's necessary in the
| |       + 182310 [james graypr] Bingo.  I think that's the perfect answer here.
| |       | 182313 [charlie cast] I think that is the best answer so far....but that seems to go against
| |       | + 182318 [desmarm gmai] I think that David's plan is a good one.  I also think that his answer
| |       | + 182321 [dblack wobbl] That doesn't say much for all the other answers :-)
| |       |   182325 [charlie cast] I guess I am being a little picky.  ruby and rails both are the best at
| |       |   182331 [desmarm gmai] 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 gmail] 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 capitain] 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 wobbl] A class method is indeed a singleton method of a Class object.  The
+ 182242 [dblack wobbl] 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 gmx.d] p [self, self.ancestors] #=> [#<Class:C>, [Class, Module, Object, Kernel]]
  + 182659 [dblack wobbl] But Object is always an ancestor, so you don't need step 2.  Also,
  | 182665 [dbatml gmx.d] Yes, but these are the steps that ruby (1.8.4) does when looking up the
  | 182668 [dblack wobbl] I think I was misunderstanding the relation between your example and
  | 182673 [dbatml gmx.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 fysh] charset=US-ASCII;
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 gma] 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 NAS] A fun, but ultimately pointless exercise from the "Python
+ 182243 [dave burt.id] My Fortran's a little rusty (I never learnt it); does this program do the
| 182251 [dave burt.id] 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 NAS] 36
+ 182265 [andy19191 fs] Your Fortran program is not legal since the value of i outside the loop
| 182284 [cdunn2001 gm] Try to write the following Fortran 77 program (note the
| 182288 [ara.t.howard] i've never had a problem with this and am routinely process files ranging from
+ 182355 [ jupp gmx.de] First of all there is no programming language calles "Fortran 77". The

^ [SUMMARY] Current Temperature (#68)
182240 [james graypr] Obviously, this quiz is about fetching data from the Internet.  People went
182244 [uncledruby g] Rudolfs Osins solution is very sound and using a web-service is a good
+ 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 7so] I'm new to RUBY, but am familar with other scripting languages, PHP,
+ 182258 [byrnejb hart] Try the Pickaxe book, the first edition is available on-line in pdf
+ 182259 [ruby anthrop] } I'm new to RUBY, but am familar with other scripting languages, PHP,
  + 182275 [gjohnson 7so] Thanks for the tips, they work like a charm.  Does anyone know why the
  | 182287 [aderobertis ] ...
  + 182392 [bob.news gmx] 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 gmail] $ 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 hugheso] irb(main):035:0*  str="[1,2][2,1][3,1][4,1]"
+ 182279 [gk cutcopy.c] puts "[1,2][2,1][3,1][4,1]".gsub(/\]\[/, '],[')
+ 182333 [bluemonk des] 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 stok.ca] irb(main):001:0> "[1,2][2,1][3,1][4,1]".gsub(/\]\[/, '],[')
| + 182386 [jeem hugheso] 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 gmail] (first problem)

^ Strange problem with rb-postgres
182292 [nicholas_wie] require 'postgres'
+ 182460 [probertm gma] 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 none.ne] ..or, if possible, try to not have both files referencing
182395 [renaud.delbr] Thank you adam for your answers,
182403 [han.holl gma] Another useful technique here is autoloading.

^ using testrb
182296 [info jayeola] 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 neur] 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 autog] != operator will use the == one
+ 182334 [pete notahat] Chris,
+ 182341 [logancapaldo] Is this fast enough?
  182446 [chrisgparker] Thanks for the replies everyone.

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

^ Net::HTTP working on Windows, but not Unix
182324 [james graypr] We have an odd problem at work today.
182335 [james graypr] Switching the code to the following seems to work everywhere, as long
182360 [james graypr] Sorry to keep responding to myself but we have now realized that that
182373 [phasis68 hot] p http.post(uri.path, "UMkey=OUR_KEY_CODE_HERE",{'Content-Type' =>
182376 [james graypr] Awesome.  Thank you so much.

^ Training
182329 [lists southe] I'm looking for someone that is a very good presenter/teacher and is

^ gsub wrapper
182346 [HQuiroz enh.] Help!
+ 182348 [none none.ne] If you have '"#{$1}->#{$2}<-#{$3}"', you can eval
+ 182349 [logancapaldo] str = "#{$1}->#{$2}<-#{$3}"
+ 182369 [interfecus g] $1 is a global variable which is set to the value matched by the
| 182375 [HQuiroz enh.] First, thanks to everyone for your input.
+ 182393 [bob.news gmx] In your case you don't even need groups, because you can nicely anchor the

^ gsub wrapper re-submitted
182347 [HQuiroz enh.] Help!

^ refactor sentencelength solution
182351 [alex.combas ] I learned a few things from doing this simple exercise and I wasjust wondering if anyone would be willing to help me refactor thecode as a further learning exercise.
182469 [none none.ne] This may be a bit buggy, but it takes advantage of the core.

^ Static v. dynamic typing
182353 [cdunn2001 gm] i've never had a problem with this and am routinely process files ranging
182401 [riko despamm] Lisp is dynamic typed, but there are Lisp compilers with C-like

^ [ANN] Ruby SNMP 1.0.0 Released
182358 [davehal42 gm] Release 1.0.0 of Ruby SNMP is now available.  (Whoo hoo!)  The feature

^ drb load limit
182361 [jaydonnell g] I am trying to get a simple drb server/client to work, but I am getting
182384 [vjoel path.b] Use a number, rather than a string, here^^^^^
182836 [jaydonnell g] now it just hangs there and does nothing :(
182843 [jaydonnell g] ok, for some reason it doesn't work if I run the server on my laptop,

^ Example of how to rb_class_new_instance(... rb_cBignum)?
182362 [no.spam plea] I'm building a C extension and have a "long long"
+ 182363 [logancapaldo] Basing this purely on a random guess (based on reasonable assumptions
| 182367 [no.spam plea] Reasonable guess I suppose, except that doesn't seem to
| 182370 [logancapaldo] Hopefully by now you've seen Daniel's more  accurate response. (LL2NUM
+ 182366 [dharple gene] VALUE foo = LL2NUM(my_long);
  182385 [no.spam plea] Thanks both. I have my extension working.

^ Nuby - why does my #inspect misbehave?
182368 [cremes.devli] I'm working through a few exercises to teach myself Ruby. One of them
+ 182371 [logancapaldo] As a general rule #inspect is not supposed to print anything it is
+ 182372 [dblack wobbl] Don't inherit from Object -- it happens automatically :-)
  182374 [james_b neur] James Britt
  182377 [dblack wobbl] David
  + 182378 [   no no.com] O-('_' Q)
  + 182383 [james_b neur] POGSFJ

^ [quesion] require just in a context?
182380 [capitain gma] Can I make some libraray just work in a context ?

^ Re: Can Anyone Recommend A Good DSL Book?
182389 [res0i3sf ver] Check out Code Generation in Action. It's a good book on code generation that uses Ruby/erb/REXML/etc. Interestingly, it was the book that got me off of my arse and looking at Ruby........

^ [ANN] Mongrel 0.3.7.1 -- 1000 Paper Cuts Release
182390 [zedshaw zeds] This release of Mongrel is coming at you with lots of very little but

^ tryruby
182396 [botp delmont] i tried http://tryruby.hobix.com and it is really beautifully done tutorial.

^ Running JRuby
182398 [pp nosuchema] Im trying to set up java and jruby on Windows, great work with the
182434 [headius head] JRuby does not provide its own set of .rb libraries to run off; it
182437 [headius head] Sorry, that's sf.net/projects/jruby, and I should probably be plugging

^ IDE suggestions
182399 [hscbaj hotma] Im new (this week) to ruby and would like to know what IDE's people are
+ 182400 [kevin.jackso] RadRails is based on Eclipse RCP (Rich Client Platform) - it's a Java
| 182402 [riko despamm] Probably more cultural than generational. My fellows programmer and I have
| 182409 [ml.chibbs gm] I use FreeRIDE also, which has the advantage of being both open source
| 182414 [dev.random g] I'm using SCITE under Linux, it's not an IDE, but it has nice syntaxhighlighting and you can configure it very well. I think it's evenpossible to get code completion to work under SCITE, but I haven't yetfigured out how. And it works in windows as well...
+ 182424 [gk cutcopy.c] Jedit with ruby plugins
| + 182428 [gk cutcopy.c] has autocompletition, and build in doku,
| + 182513 [skurapat ucs] Same here :-)
| + 182517 [sigzero gmai] I just started using jEdit + the Project Viewer plugin (and a few
| + 182612 [Sky.Yin gmai] This plugin is great, but one thing that bothers me when I'm typing is
| | 185051 [noone nowher] Plugins -> Plugin Options -> SideKick / General -> Show Completion popups
| + 182656 [esad.spammen] Is there any interested in contributing more stuff to ruby plugin: irb,
|   182926 [rob.02004 gm] Esad and others, if you have specific features that you'd like to work
+ 182516 [heimdall uni] Over the last time I used RadRails [1] and for normal Ruby coding I used
+ 182544 [ffsnoopy gma] I do my development in linux, so I use SciTE (editor) + Mr. Guid
+ 182594 [gene.tani gm] Sorta OT but good discussion: folks at Artima talk about how they use
+ 182949 [jesusrubsyou] I use Diakonos.  An editor, not an IDE (on purpose).  It runs anywhere
+ 185047 [jussij zeuse] It does Ruby syntax highlighting, code folding, class browsing,

^ Antw: Re: IDE suggestions
182404 [Fleck schlei] I' m using FreeRIDE. My goal was to get an IDE for free that' s portable. I wanted to use it either on linux and windows. I like it, when an my environment for developing software looks and feels the same regardless on which platform. I don' t want to use millions of editors or IDEs. I thin vim is a good solution too, but I needed a few weeks to get really into it, I mean really into it.

^ string slice elegant way
182405 [mage mage.hu] a = 'hello there'
+ 182406 [Nuralanur ao] You can use
+ 182408 [p.capriotti ] a[2..-1]
| + 182419 [lopexx autog] And consider that it doesnt require Ruby to have any special syntax for
| + 182425 [mage mage.hu] Thank you, I`ve only tried a[2,-1] before the letter. My fault.
|   182429 [mage mage.hu] By the way, ranges ending with lesser number than beginning seems nasty
|   182433 [dblack wobbl] They're not good for that either; [2,-1] isn't a range object :-)
|   182465 [logancapaldo] charset=US-ASCII;
|   182472 [dblack wobbl] Right -- I flipped it around.  The backward ranges do indeed serve
|   182511 [botp delmont] Mage [mailto:mage@mage.hu]
|   182527 [pertl gmx.or] a = "hello there"
+ 182411 [pbattley gma] a[/.{2}(.*)/u,1]
+ 182427 [gk cutcopy.c] p "hello there".reverse.chop.chop.reverse
threads.html
top