252870-263552

252748-254704 subjects 253107-265476

^ Ruby programming challenges and riddles?
252870 [Hakusa gmail] I recently fell in love with programming riddles and was told that
+ 252871 [olsonas gmai] You may want to check out http://www.rubyquiz.com
+ 252873 [khaines enig] puts "1...100"
| 252878 [ari aribrown] Careful with .to_a, they're getting rid of it. Break the habit while
| + 252879 [khaines enig] Someday.
| + 252880 [cdcarter gma] I was under the impression they are removing Object#to_a, not Enumerable#to_a...
|   + 252883 [apeiros gmx.] irb(main):001:0> 1.to_a
|   + 252945 [ari aribrown] You're probably right. I was criticized for using to_a in that
|     252948 [cdcarter gma] (irb):1: warning: default `to_a' will be obsolete
+ 252874 [apeiros gmx.] puts *1..100 #will print each on a new line
| 252875 [olsonas gmai] Cool! How does this work? What's going on behind the scenes?
| 252881 [apeiros gmx.] * is the splash operator, it expands an array to a list, if the object
| 252885 [Hakusa gmail] Hm. Everything I've looked at on this site is time consuming, geared
| + 252906 [james graypr] I'm obviously biased, since I run the Ruby Quiz, but...
| | 252958 [Hakusa gmail] On May 25, 12:25 am, James Edward Gray II <j...@grayproductions.net>
| + 252946 [caduceass gm] I hate reading code.  I mean absolutely *hate* with a passion.  I hate
+ 252954 [fophillips19] Maybe you should try http://projecteuler.net

^ gem update
252887 [trinity_lcx ] gem update --system in my windows XP box.
252888 [agorilla gma] Bill Guindon (aka aGorilla)
252889 [trinity_lcx ] Did anybody find a clearer solution. Am I going to reinstall rubygems as
252890 [agorilla gma] I imagine that Jim is looking into it.  You could post to the gem
252911 [trinity_lcx ] I think I solved the problem. I removed my old ruby completely (1.8.4)

^ [ANN] Actors for Ruby: The Omnibus Concurrency Library 0.1
252901 [mental rydia] With all the recent interest in Erlang, I've decided to bump up the

^ [ANN] prototype-1.0.0
252905 [ara.t.howard] NAME

^ How to know the OS platform
252909 [flyerhzm gma] How can i know which OS platform the ruby application is running, MS
+ 252913 [list.push gm] I've never used this, but does this help?
+ 252917 [dzwell gmail] $ irb

^ (none)
252912 [juanpablosot] # index

^ I think this is a regexp bug
252919 [dan-ml dan42] $KCODE='u'
252930 [fxn hashref.] fxn@feynman:~/tmp$ cat foo.rb
252947 [dan-ml dan42] Ah, silly me I forgot to test on different versions. It

^ RAILS@: select(object, method, choices, options = {}, html_options = {}) call
252936 [mark.swinson] I'm trying to insert the above call into a rails form , except that the

^ Replacement idiom for "list_or_nil.to_a"?
252938 [rdm cfcl.com] Many scripting languages, including Ruby, will "do nothing
+ 252940 [micathom gma] If you really want the extra loop in each just to find out that
| 252941 [farrel.lifso] If you're going to get a list or nil then I find it nice to wrap it in
+ 252950 [dan-ml dan42] Object#to_a will be deprecated but not nil.to_a, so the
+ 252951 [shortcutter ] Probably.  How do you like
| 252952 [cdcarter gma] That hack will also make nil.to_a => [].
| 252991 [transfire gm] If the code will be reusable, that's a little too risky.
+ 252997 [rdm cfcl.com] This is what I was using.  It's nice to know that it's not
| + 253376 [shortcutter ] This is an issue only if foo is a method that does a complex calculation.
| + 253433 [transfire gm] A very common idiom in Ruby however.
+ 253541 [anibalrojas ] list_or_nil.each do |value| unless list_or_nil.nil?

^ Rails: Does the option :host work in link_to?
252955 [shiwei.zhang] I used the following code line in a View file on machine
252967 [james.britt ] Rails questions are best asked on the Rails mailing list, where you will

^ [1.9/trunk] Bus error / abort trop with latest sources
252956 [roberto kelt] I'm compiling Ruby 1.9 from the SVN tree, latest changeset is 12384 on
252962 [nobu ruby-la] What command failed?
253586 [ollivier.rob] My guess is that it is miniruby which fails.
253796 [nobu ruby-la] Yes, obviously.  What I asked is what miniruby was about to do.

^ [QUIZ] Fractals (#125)
252961 [james graypr] 1.  Please do not post any solutions or spoiler discussion for this quiz until
+ 252964 [kyleaschmitt] If you want to create an image to view instead of on the console,
| + 252965 [kyleaschmitt] ACK!
| + 252968 [james graypr] I used a more compact PPM format though.
|   252969 [kyleaschmitt] Yea I guess that is quite a bit more compact :)
+ 253055 [m_goldberg a] I'm confused about the intent of this quiz. Is the main focus writing
| 253074 [james graypr] You guys should know by now that I'm pretty light on rules.
| 253126 [m_goldberg a] James, given the way the quiz is currently formulated, I do realize
| 253134 [james graypr] Well, he did invite graphic solutions in the quiz description...
| 253139 [m_goldberg a] charset=US-ASCII;
+ 253246 [rrafje gmail] I've gone for short but un-ruby-esque solution. Outputs an image in .pbm
+ 253429 [donald.ball ] I opted to render to the browser using the Safari/Firefox canvas object.
+ 253511 [matthew.moss] Here's my solution... It's the bare minimum of what I wanted to do.

^ Memory leak
252971 [sebastian.pr] I am currently learning to use Ruby-DBI and have a really simple script
+ 252973 [peter semant] Why is it inside a while loop?
| 252976 [sebastian.pr] Well, now, not really. I am closing the connections I am making which
| + 252977 [sebastian.pr] Well... ofcourse you were right. Moving the loop into the begin clause
| + 252978 [peter semant] If my understanding is correct the garbage collector will only jump in
|   252981 [sebastian.pr] Ok, good to know! Thanks Peter!
+ 252974 [sebastian.pr] Well, never mind... it stops "leaking" after a while. When it is at
  252979 [shortcutter ] IIRC DBI also supports the block form for opening and closing, so you
  252983 [sebastian.pr] Thanks for the tip!

^ Array troubles
252975 [Hakusa gmail] just so you know, has been unbelievable with how quickly the language
+ 252982 [shortcutter ] You don't need all the #to_s, instead you can do
| 252986 [Hakusa gmail] Thanks bundles of bundles! You haven't solved my main problem (the
+ 252995 [dzwell gmail] Hmm... shouldn't that be q^-1/32 ?

^ [ANN] Rassmalog 4.2.0
252984 [ snk gna.org] Rassmalog is a static blog engine based on YAML, eRuby, and

^ Sending mail with attachments
252985 [funkytwig gm] Have been googeling on this one for a bit.  There are commercial
+ 252988 [d454d web.de] you can use rmail to build mails with attachments, etc. Have a look at
+ 253041 [lionel-subsc] I use ActionMailer, which uses Tmail for all the gory mime/encoding
+ 253057 [Reid.Thompso] What OS?

^ web apps in Ruby
252989 [oerten ci.ve] I'm currently a Windows XP based developer. I checked the Ruby's
+ 252992 [jgarvin.list] ...
| 252999 [oerten ci.ve] Thank you very much Jon.
+ 252998 [rdm cfcl.com] Rails aside, assorted folks have written web apps in Ruby.
+ 253000 [rwvtveer gma] ...
| 253002 [oerten ci.ve] Thank you very much.
| 253017 [Nic.Daniau X] No you can't build webapps using Ruby and yes, it's only for Windows
| 253020 [fophillips19] LOL SARCASM
+ 253054 [reid.thompso] ...
+ 253089 [fophillips19] I'm currently a Windows XP based developer. I checked the Ruby's

^ Mocking Net::HTTP
253001 [ecomba mac.c] I am currently finishing up a release of Rannel, a library for
+ 253010 [B.Candler po] I'm pretty sure Flexmock can do this.
+ 253011 [jamesmead44 ] You should be able to use Mocha (http://mocha.rubyforge.org) do do this.
  253018 [ecomba mac.c] charset=US-ASCII;
  + 253043 [jamesmead44 ] You should be able to do something like this...
  | 253044 [ecomba mac.c] I checked your code and made a change in my test code taking that
  | 253045 [jamesmead44 ] No problem :-)
  + 253105 [B.Candler po] By overriding Net::HTTP's "new" method to return a new mock object which has
    254754 [pudur.ramasw] I need to develop a mockup server, so i can do performance testing

^ ANN: Sequel 0.1.4 Released - ODBC adapter and more
253004 [ciconia gmai] Sequel version 0.1.4 has just been released. This release adds an ODBC
253021 [gregory.t.br] Nice work Sharon!   I'll try wrapping this with a Ruport plugin soon. :)

^ Pipes and flush
253005 [stephanwehne] #!/usr/bin/ruby -n
253016 [vince.hetk g] the executed command necessarily flushes its output when it terminates
253038 [stephanwehne] You're saying the output from "some_executable" is passed directly on to
253104 [B.Candler po] If Ruby goes via the stdio library (fprintf and friends) then it will be

^ problems with Oracle dB oci8 connectivity
253006 [pbailey bna.] I need to connect from my Windows server over to an Oracle database in

^ Issue with ControlSend function using AutoIT in Ruby
253007 [carpeursus g] I'm having an issue running scripts that use AutoIT against my windows
253022 [chris.hulan ] ...SNIP...
253459 [carpeursus g] This worked well at first, but then my issue came back which is
253469 [jan.svitok g] This seems to be an issue with autoit itself. At first I intended to
254893 [carpeursus g] Okay, I think I figured it out, my script was automating an installer
263552 [carpeursus g] Just in case anyone else finds this post looking for resolution with

^ [ANN] ZenTest 3.6.0 Released
253013 [ryand-ruby z] ZenTest version 3.6.0 has been released!

^ Ruby Libraries
253023 [ari aribrown] Hey all,
+ 253025 [vince.hetk g] What about
| 253050 [ari aribrown] I did that - it says nothing needs to be done for `install`. Yet I
+ 253058 [cdcarter gma] Drop the .rb, that will ususally get it to load, otherwise, put the
  + 253059 [ari aribrown] Ok. I did that, but it still didn't work. After looking back to the
  + 253060 [ari aribrown] Ok, I think I answered my own question. The init function is a built
    253062 [gregory.t.br] are you sure it's not require "rubyforge"
    + 253063 [gregory.t.br] sorry for the noise, was thinking of the codeforpeople gem and didn't
    + 253065 [ari aribrown] Nope, it's rubyforger.

^ Net::HTTP - POST and GET in the same request
253026 [subsume gmai] I have a peculiar problem where I need to submit POST data to a script
253029 [ecomba mac.c] http = Net::HTTP.new('http://www.server.net')
253036 [subsume gmai] The x=y become POST variables and the {'A'=>'1' ...} drop out of the
253037 [ecomba mac.c] That is true, my typo...
253039 [subsume gmai] Now you've confused me. The above example doesn't even contain the
253042 [ecomba mac.c] response = http.post('/script.asp?y=z', 'a=1')
253046 [subsume gmai] Now we're in business. =) Thanks for your wonderful help, buddy.
253049 [ecomba mac.c] Anytime! ;)

^ printing nil objects
253027 [finerrecline] hey, im pretty new to ruby and im having trouble. this is not my
253030 [ecomba mac.c] Your problem lies exactly there. You are trying to make a method call
253032 [finerrecline] ooooh. now i feel foolish lol. thanks!
253034 [ecomba mac.c] Why should you? No one is perfect and sometimes when in the middle of

^ [ANN] RSpec-1.0.3
253033 [dchelimsky g] The RSpec Development Team is pleased to announce the release of RSpec-1.0.3.

^ Re: [ANN] Rassmalog 4.2.0 => 5.0.0
253035 [ snk gna.org] It turns out that, according to the RubyGems rational versioning policy,

^ Core dump
253048 [zflyer gmail] I'm new to Ruby, so I may be doing something wrong, but the following
253268 [zflyer gmail] Can someone confirm this so I know if it's my ruby compilation or not?
+ 253270 [ryand-ruby z] Why? Ruby shouldn't core dump. Ever. Either ruby has a bug or a
| 253312 [zflyer gmail] It's a long stack trace, so I've posted only part of it.  I can
+ 253272 [striker trip] I am using Ruby 1.8.6 for Windows and would like to use that version of

^ Re: RSpec-1.0.3
253051 [barjunk attg] Nice!

^ refactoring
253052 [barjunk attg] Although this particular code is part of some goofing around I am
253053 [barjunk attg] One other thing...the Myuser model does not have a row associated with
253081 [david gensym] Mike,

^ libnet4r
253061 [ari aribrown] Hmph. Googling libnet4r returns nothing.

^ Ruby Math (nPr, nCr)
253066 [ari aribrown] What's that? You want me to ask more questions? Sure!
+ 253067 [dzwell gmail] Ari,
| + 253073 [dzwell gmail] def nPr(r)
| + 253083 [sepp2k googl] Class methods.
+ 253106 [B.Candler po] Of course Ruby has Bignums, but you could make the program more efficient by

^ Global Array?
253069 [subsume gmai] I've got a class which calls itself several times (recursive). While
+ 253070 [transfire gm] Have some code?
+ 253071 [highlyjhi gm] Are you putting a dollar sign ($) in front of the variable's name?
+ 253072 [dzwell gmail] class Klass
  + 253084 [shortcutter ] No, rather use a class instance variable.  But even that has problems
  + 253102 [subsume gmai] Went with this. Thanks
    253123 [pstickne gma] If it's a class calling itself, vs. an object (instance of the class)

^ Newbie question: variable method call
253075 [kal starkis.] Is there a way to use the value of a variable to call a method of that
253076 [ezmobius gma] pet.send action
+ 253077 [matthieutc y] method_name = "feed"
+ 253078 [kal starkis.] Thanks Ezra!

^ (none)
253079 [juanpablosot] # unsubscribe

^ RXML
253080 [pshussain gm] Hai
+ 253128 [B.Candler po] ...
+ 253143 [halostatue g] What's an RXML file? Is it something that belongs to Rails? If so, ask

^ gsub + loop
253082 [gott himmel.] This question actually pertains to a Rails app but it's more of a
253085 [shortcutter ] You're right on!
253124 [pstickne gma] While not related to using gsub/regular expressions, consider an
253203 [sireleo gmai] Thanks, this seems to work out fine.  I used hash keys just in case.  It

^ ANN: Sequel 0.1.5 Released
253088 [ciconia gmai] Sequel version 0.1.5 has just been released. This release adds support

^ How to completely terminate a WIN32OLE Excel object?
253090 [sven715rt su] I can't get rid of Excel, if I have ever called it,
+ 253091 [sven715rt su] This happens both with Ruby 1.8.6 and 1.8.5.
+ 253181 [jftucker gma] => true
+ 253292 [masaki.suket] I am not sure, but it seems to me because of GC behavior.

^ Ruby has not been added to LSB 3.2 (but both Perl and Python)
253092 [jonas.esp go] I've seen that the next version of LSB 3.2 (will be released on June,
+ 253151 [znmeb cesmai] While I agree that Ruby "should" be part of the LSB, the fact is that
| 253159 [pstickne gma] Or just...
| + 253175 [dangerwillro] or dont worry about it.
| + 253183 [alex blackke] I think that must be the point - it's not that the LSB people
|   253242 [dangerwillro] This is exactly the kind of reason why these are installed by
+ 253233 [tpo2 sourcep] I don't see how not including Ruby by default could be a problem (mind

^ Forward references?
253093 [seebs seebs.] I am trying to figure out what the cleanest way is to express a class that has
+ 253094 [shortcutter ] First of all, your example is about nested classes and not subclasses.
| 253095 [seebs seebs.] I knew that.  Maybe I shouldn't be on decaf.
+ 253096 [garbagecat10] The fact that "Foo::Bar" is undefined in Foo#initialize doesn't matter to
| 253097 [seebs seebs.] class A::B
| 253098 [garbagecat10] In this construction you're defining B inside the naming context of A, which
| 253099 [seebs seebs.] class A
+ 253101 [onepoint sta] I would say yes.  My rule of thumb is that any file that explicitly
  253109 [garbagecat10] I think your rule of thumb is absolutely right. Always make your code as as

^ [ANN] Erubis 2.3.1 released - a serious bug is fixed in rails_helper.rb
253100 [kwa kuwata-l] Erubis 2.3.1 released.

^ local variables vs. methods
253103 [no.spam nspm] I've been playing around with Ruby for a while, but there's still one
+ 253108 [Hakusa gmail] If a language stops you from doing something just because it's bad
| 253112 [no.spam nspm] Fine, so don't stop be. Warn me that I'm doing something which is
| + 253114 [Hakusa gmail] What if instead of printing bar's output with puts bar, bar was a
| | 253116 [no.spam nspm] I think a nicer way of doing this would be to overload bar with a method
| + 253115 [no.spam nspm] In fact, now that I think about it, how would you override a method from
| | + 253117 [Hakusa gmail] I still don't really know how to use a proc or anything like that, but
| | | 253119 [no.spam nspm] It is.
| | | 253129 [transfire gm] class X
| | + 253165 [dan-ml dan42] foo = self.foo
| + 253132 [B.Candler po] (1) All objects are descendants of Object, which in turn mixes in Kernel.
|   253148 [no.spam nspm] Hmmm, I didn't think of that. Local variable/method ambiguity is only a
|   + 253166 [dblack wobbl] It does work -- it assigns init_x and init_y to the local variables x
|   + 253204 [B.Candler po] I disagree. If someone uses your class, then he or she will look at your
+ 253110 [garbagecat10] C++ does the same thing, you know. It's not mysterious if you understand how
+ 253130 [transfire gm] Perhaps we could ask about this from the opposite perspective. Would
| 253146 [no.spam nspm] I didn't know you could do that. That's kinda horrible :)
+ 253219 [logancapaldo] Just to throw out another reason, that I don't think has been mentioned
threads.html
top