360101-360992

359900-360326 subjects 360336-361263

^ Post-Condition if Statements And NameErrors
360101 [hsomob1999 y] def bs
360118 [echristopher] Something like this came up a few weeks ago. I think the parser is the
360173 [eregontp gma] Yeah, that's a bit annoying and considerably reduce while-one-liners

^ Ruby solve classic math problem: make 56 from four 4s
360102 [kelly.terry.] A classic math problem asks "using only four 4s and any
+ 360164 [m.fellinger ] The first thing that came to mind was http://www.rubyquiz.com/quiz60.html
| 360169 [b.candler po] Posted via http://www.ruby-forum.com/.
+ 360166 [shortcutter ] As long as you do not limit the number of unary operations that
| 360188 [kelly.terry.] Thanks, and thanks to everyone else who replied.
+ 360180 [glennj ncf.c] See http://rosettacode.org/wiki/24_game_Player

^ each_slice()
360103 [albertschlef] some_array.each_slice(2).to_a
360110 [albertschlef] I searched the net and it seems it's only safe to use each_slice() in
+ 360111 [albertschlef] some_array = [1,2,3,4,5,6]
+ 360114 [rick.denatal] require 'enumerator'
  360115 [albertschlef] But how is your answer helpful?
  360116 [albertschlef] each_slice() was introduced in 1.9. It was then backported to 1.8.
  + 360122 [rick.denatal] No,
  | 360124 [albertschlef] Rick, thank you for this info. Much of this is new to me.
  + 360150 [shortcutter ] I have enough confidence that if not all at least most versions
    360233 [albertschlef] Thanks.

^ how to solve this regular expression problem
360105 [amishera2007] s = 'C#039;era una volta il east'
360106 [amishera2007] s.gsub!(/#(\d+);/) { puts $1; conv_char($1) }
360107 [amishera2007] Okay it did solve half of the problem. Other half is how to display a
360112 [max.schmidt.] You have to escape the slash (\) like this
360117 [dnspringer g] s.gsub!(/#(\d+);/, "\134\134#{conv_char($)}")
360119 [dnspringer g] s.gsub!(/#(\d+);/, "\134\134#{conv_char($1)}")
360121 [dnspringer g] OK I was wrong. This does work.

^ Rake 0.8.7 needs Ruby 1.8?
360120 [jstuardo des] I am trying to install a Ruby application called Redmine. In order to
+ 360137 [rogerpack200] This means "you're running some gem or other that has binaries for 1.8
| 360159 [jstuardo des] rake aborted!
| 360182 [rogerpack200] Thanks for doing that.  The backtrace I even more desire would be
+ 360230 [luislavena g] Rake do not depend directly of Ruby runtime library either for 1.8 or

^ socket programming...lsof?
360123 [derekbellner] Is there a ruby substitute for lsof's functionality?  Meaning I want to
+ 360136 [rogerpack200] You could try binding to that port and rescue the error (error meaning
+ 360139 [batchsend ya] Can I ask the rubygems module is used for what purpose?
| 360142 [rajeswarr iv] require 'socket'
+ 360144 [normalperson] I was wondering that today, too.  lsof is highly system-specific, so it
| + 360231 [derekbellner] Eric Wong
| | 360269 [derekbellner] What if I want to see any data passing over that port, 113 or any other
| | 360304 [normalperson] You should actually use something like tcpdump or some other sniffer.
| + 360666 [normalperson] Well, I went down that rabbit hole and came out with Raindrops :)
+ 360679 [xsw1024 gmai] there is no server side!

^ change in number of leading spaces
360126 [jessebos aol] Sorry about re-post due to typo.
+ 360127 [alex.decaria] Your variable "stored" is only defined and used within the loop, so it
+ 360149 [shortcutter ] You can simplify this by using
  360391 [jessebos aol] Robert, Thank you for taking the time to write back.

^ [ANN] Rubygame 2.6.3, Nice-FFI 0.4
360141 [jacius gmail] Rubygame 2.6.3 and Nice-FFI 0.4 are now available -- no foolin'!

^ [ANN] Dfect 2.1.0 (2010-03-31)
360143 [sunaku gmail] Dfect 2.1.0 (2010-03-31)

^ [ANN] Rumai 3.2.2 (2010-04-01)
360147 [sunaku gmail] Rumai 3.2.2 (2010-04-01)

^ Mysql gem installation
360151 [julien.biard] I have recently installed a gentoo bootstrap prefix on os x, but when I want
360158 [julien.biard] Issue solved.

^ [ANN] rdoc-data 2.5.1 Released
360154 [drbrain segm] rdoc-data contains core ri data for use with RDoc 2.5
360730 [matt tidbits] $ rdoc-data

^ [ANN] rdoc 2.5 Released
360155 [drbrain segm] rdoc version 2.5 has been released!
360184 [drbrain segm] gem rdoc --all --overwrite --no-rdoc

^ Rails JQuery issue
360167 [stoicism1 ao] Hey all,

^ Is there a method to set variable to NaN or Infinity?
360170 [alex.decaria] Is there a built-in method to set a floating point value to NaN or
+ 360171 [  jbw jbw.cc] I read in the BigDecimal docs you can do n = BigDecimal.new('NaN'). But
+ 360204 [colinb2r goo] -Float::Infinity    #=3D> -Infinity
  + 360209 [alex.decaria] I do a lot of my scientific programming in IDL.  It allows explicit
  + 360214 [mike stok.ca] That's a pretty small infinity :-)
    360215 [colinb2r goo] Well, us wot have studied maffematics can deal with LOADS of infinitys!

^ [ANN] phuby 1.0.0 Released
360172 [aaron tender] THIS IS NOT A JOKE. I AM VERY SERIOUSLY RELEASING PHUBY.
+ 360175 [tony medioh.] Awesome, now we can stop hiring expensive Ruby developers and farm the grunt
+ 360176 [default spir] I was hoping for a realbasic runtime... Bummer!
+ 360197 [tim.pease gm] I'm sorry, but a little vomit just came up in my mouth. You keep at it =

^ Re: phuby 1.0.0 Released
360189 [aldric trevo] Do you hear that? Do you? It's the sound a million kittens crying out

^ Dynamic Method Calls
360191 [MR-Mencel wi] Right now I have some inefficient code that looks like this...
+ 360194 [andrea andre] Hei Matt,
+ 360195 [andrea andre] c.send("#{k}=".to_sym, v)
  360196 [ryand-ruby z] .to_sym is unnecessary
  360205 [MR-Mencel wi] This did it...thanks for the assistance... :)
  360206 [aurelien.ami] You should try to serialize your array instead of saving it as a string
  360211 [MR-Mencel wi] Hmmm...can't seem to make that happen....
  360212 [aurelien.ami] '---

^ Re: rdoc 2.5 Released
360198 [rogerpack200] Thanks for the update. Appears to parse the core stuffs well now.
360228 [drbrain segm] I made sure to make rdoc parsing be warning-free for ruby (and most =
360248 [sutniuq gmx.] Why don't you allow headings in method documentations any more? I've
360274 [drbrain segm] output.
360278 [sutniuq gmx.] I'm the maintainer of the gems au3 and xdo, but when I released them I
360279 [drbrain segm] I've=20

^ Rake task with variable arguments
360200 [glenn_ritz y] I want to create a Rails rake task that can accept a varying number of

^ [ANN]"specific_install" gem plugin released
360201 [rogerpack200] Pleased to announce the initial release of the "specific_install" gem.

^ ruby-sdl problem
360213 [jvalencia cl] (http://www.oreillynet.com/pub/a/ruby/2007/12/04/creating-games-in-ruby.html)
360252 [severus post] would suggest looking at

^ any library to aid me in adding data to fields of a pdf?
360220 [grary.stimon] I've got a pdf form that I'd like to fill out from a ruby app. All the

^ Its a bird, its a plane, its.. um, an Attribute based System?
360221 [gmkoller gma] And this doesn't make any particular sense to me.
360227 [gmkoller gma] ...
360229 [gmkoller gma] absolute last word from me forever on this as things are....
360259 [ninja slapha] Not to feed the troll, and I realize I'm late to this thread, but...
+ 360260 [usenet-nospa] Exactly.
| 360286 [gmkoller gma] better a stream than a puddle
+ 360262 [LeCouey sfcn] I'm a lurker here myself. My time is very restricted right now, but I
  + 360265 [sophrinix gm] Bingo. I even gave him a signed NDA so I can see code-- and phone
  + 360272 [gmkoller gma] you
    + 360282 [gmkoller gma] Defining "these things" may not be as simple as it may seem.  Some of
    + 360293 [ninja slapha] You don't have time to simply upload it to Github?
      360299 [usenet-nospa] I am wondering if you have ever heard the phrase "dot com startup".
      + 360303 [josh.cheek g] How about posting the code for one Boid? You said they are very small so
      | 360307 [gmkoller gma] Check the time if you really want to.   I put that up before the
      + 360310 [gmkoller gma] The hallmark of a startup would seem to be

^ Its a bird, its a plane, its.. um, an Attribute based System?
360222 [gmkoller gma] And this doesn't make any particular sense to me.

^ Gems installed to $HOME not recognized
360232 [albertschlef] I'm using Ruby 1.9, Ubuntu (I don't have the following problem with my
+ 360652 [andrew theak] I found that it was a lot of hassle trying to get Ruby1.9 setup on Ubuntu,
+ 360992 [jgrdev gmail] I had the same problem on Ubuntu 9.10. Setting the environment

^ [ANN] Padrino Webapp Framework
360234 [xgamerx10 gm] <a href="http://www.padrinorb.com">Padrino</a> is a <a
360235 [xgamerx10 gm] Sorry about the formatting on this post. I wish I could edit the content

^ Autocalculate field in a form
360236 [naomi.mathes] I have a form with the following fields
360242 [b.candler po] You need Javascript for this.
360355 [dineth_nipun] Yes, because I'm new to Ruby can you please explain this for me. Thanks.
360362 [b.candler po] Questions about Javascript should be asked on a Javascript mailing list.

^ °»arch -i386 ruby°… not loading into 32-bit mode in 10.6.3
360239 [lists f-p-i.] <2.33GHz MBPC2D running OS X 10.6.3>
360284 [has.temp3 vi] Not clear how you ran it, but it sounds as if you're still running in
360287 [lists f-p-i.] I°«ve been entering it manually into Terminal and also running it as an
360309 [has.temp3 vi] The hashbang at the top of a script only applies when you execute the

^ scope question
360241 [list.push gm] Maybe I'm missing something obvious here, but...
+ 360243 [ryand-ruby z] nope. that's how it works. Every reference (variable, name, whatever you =
| 360249 [jgabrielygal] want to call it) to an object (with some exceptions) is a pointer to the ac=
| 360258 [josh.cheek g] 2010/4/2 Jes=FAs Gabriel y Gal=E1n <jgabrielygalan@gmail.com>
| 360357 [list.push gm] Thanks for all the explanations, everybody.
| 360361 [jgabrielygal] That is true: method parameters are local variables in that method
| 360384 [Ron.Foster w] Coming from a C background, I had similar difficulties; worrying about
+ 360245 [Gennady.Byst] I am afraid, you are. Hopefully not for long ;-)
  360246 [list.push gm] and an_array hold references to hash and array object respectively, not cop=
  360250 [jgabrielygal] and an_array hold references to hash and array

^ about define significance variable(in this situation)
360244 [g.zhen.ning ] def method_1(options ={})
360261 [shortcutter ] I would not name it at all.

^ require rubygems
360247 [eva54321 sin] For what purpose is this module used? Thanks.
+ 360251 [ravenz o2.ie] Using google, might help you, because is a FAQ but, i give you this
+ 360292 [josh.cheek g] In Ruby, libraries (sets of code you can use in your program that other

^ Fill a table in ruby
360253 [banil86 yaho] I want to read the datas from a file and fill a table with them.
+ 360254 [  jbw jbw.cc] Sounds like a matrix class might work for you
+ 360256 [gf.bozzetti ] class Table
  360399 [banil86 yaho] Thank you i was looking sth like that.

^ Puts - not putting 'all' content on display console
360255 [dave dyad.ca] I am using Ruby 1.86 to process a 7,000+ record file and using Regular
+ 360257 [driodeiros g] Umm.. there is not.
| 360333 [dave dyad.ca] I have redirected the output to a file instead of just using the
+ 360263 [echristopher] puts is buffered. Try calling $stdout.flush.

^ A little help needed
360264 [s1ay3r44 gma] What exactly does the '@' symbol mean when used for the scope of a
360266 [jgabrielygal] It means it's an instance variable of the object that is currently
360267 [s1ay3r44 gma] Oh! I see!
360268 [jonathan jmn] Not quite... it's a variable in the instance that it is declared.  So,
360270 [s1ay3r44 gma] So... it's a variable that can only be used in that instance and nowhere
+ 360271 [jonathan jmn] Yes, it can only be used within that class.  You can, however, create
| 360273 [s1ay3r44 gma] Yep, already knew that. Thanks for clearing this up for me. I'm creating
+ 360290 [josh.cheek g] You can also just say @x, here, because puts will convert the objects it

^ combined ranges...
360275 [rogerpack200] Anybody know if there's an easy way to accomplish the equivalent of
+ 360276 [dnspringer g] [1..20,30..46].each{|r| r.each {|n| p n}}
| + 360280 [dnspringer g] [(1..20),(30..46)].each{|r| r.each {|n| p n}}
| + 360283 [rogerpack200] Yeah that works.
|   + 360285 [rick.denatal] or
|   | + 360288 [tomonacci gm] You can splat objects with to_a everywhere.
|   | | 360297 [rick.denatal] I'm afraid that that give a syntax error in both 1.8.7 and 1.9
|   | | 360298 [gwtmp01 mac.] $ ruby1.9 -v
|   | | 360316 [shortcutter ] I don't think so.
|   | + 360308 [ryand-ruby z] class Range
|   |   360315 [transfire gm] 20, 25, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46]
|   |   360318 [transfire gm] module Enumerable
|   |   360329 [colinb2r goo] Is this the Array#recursively "TODO: Can this be generalized in Enumerable?" :)
|   |   + 360349 [transfire gm] e?" :)http://facets.rubyforge.org/apidoc/api/core/classes/Array.html#M00005=
|   |   | + 360351 [vikkous gmai] This won't behave well if passed a true graph (not just tree or dag)
|   |   | | 360354 [colinb2r goo] So, temporarily ignoring the problem of possible infinite loops
|   |   | | 360358 [vikkous gmai] Actually, while interesting, recursive_each and friends are not really
|   |   | + 360352 [colinb2r goo] ve
|   |   + 360364 [shortcutter ] Thanks!  I think you're right: "depth" is a better name than "level".
|   + 360313 [colinb2r goo] Given the solutions proposed, in suggesting this I have a feeling
|     360317 [shortcutter ] module Enumerable
+ 360277 [jonathan jmn] Only thing that comes to mind for me is
+ 360291 [vikkous gmai] Oh, I wish for a real integer set class!
  360365 [shortcutter ] irb(main):004:0> set = 0
  360387 [vikkous gmai] Well, yeah, and that's fine for storing sets of small integers. Or I
  360390 [shortcutter ] I believe, it's more since you explicitly stated you want large numbers

^ ANN: Sequel 3.10.0 Released
360281 [code jeremye] Sequel is a lightweight database access toolkit for Ruby.

^ solutions manual?
360294 [gabe ruby-la] do you have elementary differential equations with boundary value problems 4th edition edwards and penney solutions manual?

^ solutions manual?
360296 [gabe ruby-la] do you have elementary differential equations with boundary problems 4th edition edwards and penney solutions manual?

^ hash key with multiple values
360300 [lakshmi27.u ] i have the hash result is
+ 360301 [jeanjulien.f] I would rather say that it is an array of hashes that you want to
+ 360305 [b.candler po] Note that {z=>"ci5","i63"} is not valid hash syntax. But you can have
  360306 [b.candler po] BTW, the structure you have with an array of hashes, each hash with a
  360311 [lakshmi27.u ] every solution is working
  360314 [shortcutter ] In Ruby 1.9 Hash maintains insertion order so you should get what you
  360360 [lakshmi27.u ] method

^ RQ proposal
360312 [robert.dober] Write a ruby program that produces thruz (whatwassaname? ;) like posts.
360324 [jeanjulien.f] Hum, could be fun.

^ gem update error
360319 [junkone1 gma] dunno what to do. i have a ruby installed on my new machine and cannot
360320 [luislavena g] Are you behind a firewall or proxy? That is the common source of this
360321 [junkone1 gma] no. i am in direct connection to internet.
+ 360323 [junkone1 gma] well. i tried to ping the rubygems.org and am getting a crazy error. i
| 360327 [luislavena g] not
| 360328 [junkone1 gma] annot
+ 360325 [junkone1 gma] when i tried to ping from web, it is pingable only from USA

^ new Ruby blog: RubyPlanet.net
360330 [mark.watson ] I am the author of one Ruby book (for Apress) and I use Ruby a lot in
+ 360353 [josh.cheek g] Thanks, Mark, I'll check it out :)
| 360457 [mark.watson ] in
+ 360410 [aldric trevo] (or maybe 'stalking' ? ). I am vaguely saddened to see that the
  360456 [mark.watson ] That is a cool domain name :-)

^ [ANN] ThunkGen released!
360331 [andrea andre] Ahem...
+ 360335 [phil pricom.] Andrea,
+ 360341 [cremes.devli] BTW, I am certain "thunk" goes out of his way to make his writing obtuse. I read some of his earlier non-boid/non-ruid posts to this list; they made sense and had (for the most part) proper syntax and grammar.
  360345 [robert.dober] I read some of his earlier non-boid/non-ruid posts to this list; they made=

^ Tk delay
360332 [e.j.jurman g] I am somewhat new to Ruby and Tk, I have made a couple of simple
360340 [e.j.jurman g] I'm using the Snack audio toolkit for ruby, so I already know how long
+ 360359 [m.fellinger ] ruby -rtk -e 'Tk.after(5000){ puts "hi" }; Tk.mainloop'
| 360394 [e.j.jurman g] Thanks, this works... but I can't get it to loop! I'm going to try using
| + 360395 [m.fellinger ] tick = lambda{
| | 360520 [e.j.jurman g] Thanks! Works perfectly!
| + 360396 [nagai ai.kyu] interval argument of TkTimer can accept a proc object.
+ 360392 [nagai ai.kyu] Snack toolkit can call a callback procedure at end of the sound.
threads.html
top