233921-237792

233677-237122 subjects 234174-246860

^ How does Array.map work for 2D arrays?
233921 [karthik.nar ] pt = [ [ "Check", "check" ], [ "Credit card", "cc" ], [ "Purchase
+ 233925 [shortcutter ] irb(main):001:0> def foo() yield 1,2 end
| 233936 [karthik.nar ] wow, robert, that makes a lot of sense Thanks !
| 233941 [shortcutter ] You're welcome!
| 234552 [slamboy gmai] Just wanted to throw in another set of thanks(late, I know); that response
+ 234069 [rabbitblue g] Two points. First, I don't know how it figures it out. Second, your
  234072 [karthik.nar ] yes makes sense!!

^ "soemthing".pluralize/at/from/... -> NoMethodError
233938 [david.krmpot] I've been wondering about this for some time now.. Why don't any of the
+ 233939 [dblack wobbl] Those methods are add-ons that come with Rails.  They're not part of
+ 233955 [jamis 37sign] David,
  + 234000 [david.krmpot] Ok, that explains everything  - thank you very much Jamis, I appreciate
  | 234150 [david.krmpot] irb(main)> require 'rubygems'
  | 234162 [david.krmpot] irb(main):001:0> require 'rubygems'
  | + 234204 [halostatue g] Yes. require_gem is deprecated. Don't use it if at all possible.
  | + 234367 [showaltb gma] require_gem is "good"; it just isn't doing what you think it does.
  + 234049 [nlloyds gmai] You can still use ActiveSupport without Rails. Just
    234139 [cladev gmail] I think you must require 'rubygems' after 'active_support'.
    234140 [cladev gmail] "you must require 'rubygems' before 'active_support'" (s/after/before)

^ A Game Engine for Ruby somewhere ?
233945 [user domain.] Ruby (not a raw opengl binding)
234133 [GGarramuno a] Irrlitch (spelling?) has some ruby bindings.

^ Question about Array's size instance method
233946 [matthew.gret] I have a quick question regarding the way the size instance method works
233948 [TimHunter nc] Ruby always knows the current size of the array. It doesn't have to be
233949 [dblack wobbl] I'll just add, in case it helps with future understanding of something
233972 [gwtmp01 mac.] Call me pedantic, but I think it is important to point out that Dave's
234094 [dblack wobbl] I won't call you pedantic, if you don't call me Dave :-)
234112 [robert.dober] How much did you pay him for serving this one? :)

^ Re: Number Spiral (#109) [solution]
233956 [rubytraining] Here's my solution to the quiz.  I used a recursive solution.  An
233964 [rubytraining] Here's a modified version of my previous solution that uses no arrays

^ possible to un-warn?
233963 [dchelimsky g] cat.should_eat "tuna"
+ 233982 [wilsonb gmai] Unfortunately this happens in parse.y, without any conditional code
| 233987 [dchelimsky g] Bummer. Well, you're a rails developer - how much would this syntax
| + 234001 [wilsonb gmai] That looks totally fine. "Even" as a Rails developer, I use parens
| | 234023 [dchelimsky g] Remember the whole sugar causes cancer thing? I've added suppport for
| | 234029 [wilsonb gmai] @hotel.should.be_booked_solid_on "12/31/2007"
| | 234098 [dchelimsky g] YES!!!!!!!!!!!
| | 234141 [Gennady.Byst] You may have missed it, but it was exactly what I have suggested (or
| | 234143 [dchelimsky g] Ah - I did miss it.
| + 234144 [mvette13 gma] respoonse.should :have_tag, "html:root>head>title", "Login"
|   234348 [dchelimsky g] That idea came up a long time ago on the rspec list and got a pretty
+ 233989 [Gennady.Byst] It used not to warn in Ruby 1.6.4, by the way. I also experienced the

^ how to translate base 10 number into base 2 number
233969 [chen_li3 yah] I want to write a method to tranlate base 10 number
+ 233974 [rubytraining] def ten_to_two(num1)
| 234570 [chen_li3 yah] Thanks for the explanations. It helps me out.
| 235677 [roland.mai g] I wonder why there isn't support for negative radix; even though the
+ 233975 [khaines enig] This doesn't answer your question, but in case you were not aware, Ruby
  + 233977 [chen_li3 yah] Thanks. But is is possible do the opposite, from
  | + 233978 [jtregunna bl] "111101".to_i(2)
  | + 233985 [khaines enig] puts '1111101'.to_i(2)
  + 233994 [umageller gm] TAWLWTDIT
  | 234002 [shortcutter ] Since we start collecting solutions...
  | 234012 [umageller gm] readable and concise
  + 234085 [raymond.jaco] Is there a way to pad the result with leading zeros
    + 234090 [shortcutter ] irb(main):004:0> "%08b" % 4
    | 234095 [raymond.jaco] Thank you,
    + 234092 [angus quovad] (speaking of strings...)

^ Re: curb problems on OS X [RESOLVED]
233980 [lists kalama] Just FYI, it looks like this has been fixed with curb version 0.1.2

^ Re: Problems with Posting to comp.lang.ruby, due to gateway
233986 [ snk gna.org] RubyForum (www.ruby-forum.com) is one such alternative.

^ [ANN] Curb 0.1.2
234006 [rosco roscop] Curb 0.1.2 is now available from the curb project on Rubyforge

^ Installing FileUtils Module
234018 [lovell.mcilw] Does anyone know how I can install the fileutils module for ruby? or
234024 [wilsonb gmai] FileUtils is part of the Ruby standard library. You just need to

^ File.rename says file name is to long
234019 [lovell.mcilw] Hey guys,
+ 234022 [vincent.four] test.to_s is a single string containing the concatenation of all the
+ 234026 [slamboy gmai] Um, haven't played with it, but should the counter = 0 be inside your loop?
+ 234034 [jan.svitok g] you can write just (unless you want to append the data, in which case

^ [QUIZ] Number Spiral (#109) [solution]
234031 [flevour gmai] This is my first partecipation to Ruby Quiz. I developed a pretty messy
234037 [ruby-talk do] #!/usr/bin/env ruby

^ Ruby 1.8.2 install missing mkmf.rb on Red Hat Linux
234042 [billmcn gmai] My version of Ruby on Red Hat Linux is missing mkmf.rb.
+ 234043 [drbrain segm] This is probably due to Red Hat breaking ruby.  mkmf.rb has been part
+ 234045 [matt kettlew] Isn't Ubuntu a Linux Distro?
  + 234047 [drbrain segm] No.  This is a bug.
  + 234048 [billmcn gmai] Ubuntu is a Linux distribution.  I meant to say "..would apply to a Red

^ Re: Ruby 1.8.2 install missing mkmf.rb
234050 [matt kettlew] Well, we'll just have to agree to disagree. It's a Bikeshed matter,with

^ [ANN] keybox 1.0.0 Released
234052 [jeremy hineg] keybox version 1.0.0 has been released.
+ 234056 [gregory.t.br] Neat. you may want to look at Highline for OS independent password entry.
| 234134 [jeremy hineg] I considered using Highline and even looked at how it handled stty
| 234149 [gregory.t.br] Just vendor HighLine with your tool.  It's only like, 3 or 4 files,
| 234229 [jeremy hineg] I don't know why I didn't think of that.  Sounds good, I should
+ 234066 [andre bonhot] Nice, but it looks terrible on my whiteish terminal. Is there an easy =20=
  + 234146 [gregory.t.br] To double plug, Highline would make that easy too. :)
  + 234227 [jeremy hineg] Not from a user-configurable standpoint.  But its a great idea so I'll
    + 234234 [gregory.t.br] You don't have to :)
    | 234237 [gregory.t.br] Oh, i didn't quite understand the question.  You should definitely use
    | 234261 [jeremy hineg] Yeah, something along those lines.  I'll give it some thought and see
    | 234265 [gregory.t.br] Cool!  If you'd like to submit a patch send it to james <at>
    + 234278 [andre bonhot] Sure :-) I have set my Terminal.app to white on black for the time =20
      234281 [jeremy hineg] Yeah, a convert!.  Are you able to take advantage of --import-from-csv ?
      234283 [andre bonhot] Sure. Works fine.

^ Error when tryinh to install cached_model
234058 [abhishek uza] when i m trying to install cached_model using gem so i m getting error
234060 [abhishek uza] The actual problem seems to be that cached_model requires hoe. Hoe
234061 [drbrain segm] The mirrors should be cleared out now, but you may need to delete

^ Can anyone try to solve this problems?
234063 [gabilla19992] I am trying to solve these three problems in Ruby. I do not know if my solutions are really correct. I just wanted to ask help, if somebody can show their solutions. I would appreciated your help.
+ 234107 [slamboy gmai] Neat!  Where are you taking classes on ruby? seriously.
| 234547 [gabilla19992] Neat!  Where are you taking classes on ruby? seriously.
+ 234160 [moose56 gmai] Is this from the Brian Schroder Ruby Course PDF?
| + 234213 [danfinnie op] That is the classic searching algorithm (almost).  However there is
| + 234222 [gregory.t.br] ['fodfsafdfsdfso','bar','bazzzzzz'].sort_by { |s| s.length }.pop
| | + 234247 [nobu ruby-la] max_by(&:length)
| | | + 234253 [botp delmont] # > ['fodfsafdfsdfso','bar','bazzzzzz'].sort_by { |s| s.length }.pop
| | | | + 234311 [invalid gmx.] enum.max { |x,y| x.length <=> y.length }
| | | | + 234366 [nobu ruby-la] I don't think so, but Symbol#to_proc was incorporated from
| | | + 234259 [gregory.t.br] Looking forward to 1.9 Nobu! :)
| | + 234260 [moose56 gmai] The beauty of a one line solution :-)
| |   234264 [gregory.t.br] This is an Enumerable method from 1.9
| + 234408 [martin snowp] Well, okay, we've heard from folks with their fancy 1.9 ruby with
|   + 234413 [gregory.t.br] Daniel, this is a much better solution than my sort_by one.  So good work! :)
|   + 234415 [ssmoot gmail] => "three"
|     + 234417 [gregory.t.br] Yep, this is smarter than my ruby attempt :)
|     + 234484 [martin snowp] Why build up a separate hash structure?
|       234492 [ssmoot gmail] It's simpler to my eyes. It's also (admittedly unintuitively) faster
+ 234226 [botp delmont] #---------------------------------------------------------------

^ Binding to Java based Websphere MQ libraries
234067 [phillipsds y] IBM make available a fairly comprehensive collection of Java classes
234172 [Rob AgileCon] Well, I'd say Google for a bit first...
234303 [phillipsds y] Thanks for the response Rob,
234328 [Rob AgileCon] Dave,
234514 [phillipsds y] Thanks for the tip on Groovy, I'd not come across this before, but it

^ a 2Dgraphics alike lib for ruby ?
234071 [fugitif sdf.] all in subject :( ... i've seen stuff like tioga (linux) or gnuplot, but
+ 234166 [vjoel path.b] There's the TkCanvas widget, which you can use through Ruby's Tk
+ 234177 [no spam.plea] RMagick gives you a drawing API into an in-memory image,

^ keystrokes detection for non-control, meta key
234073 [teeshift gma] I have tried
234167 [vjoel path.b] Try
234476 [teeshift gma] Thank you Joel.
234502 [vjoel path.b] You're welcome!
237786 [teeshift gma] Thanks. Joel.
237792 [teeshift gma] Ignore my previous message. The answer is at

^ cannot return negative value ?
234078 [josselin wan] parse error, unexpected tUMINUS_NUM
+ 234080 [farrel.lifso] return userCredentials.flagged? ? -1 : 1
| 234087 [josselin wan] hanks a lot first time I was using this kind of return... ;-))
+ 234081 [peter rubyra] You mean
| + 234086 [josselin wan] thanks a lot first time I was using this kind of return... ;-))
| + 234088 [farrel.lifso] This seems to work though
+ 234093 [lists bertra] when saying
+ 234132 [nobu ruby-la] Because `return' is a statement.  In Ruby, a "statement" is

^ How to realize method/function overloading in Ruby?
234079 [shiwei.zhang] I think Function Overloading in C++ is very meaningful. And currently
+ 234117 [gwtmp01 mac.] This is a common question.  The short answer is that function
| 234275 [gregory.t.br] def do_something(a)
| 234276 [gregory.t.br] ...
| 234277 [gregory.t.br] Jeez! Sorry for the 3 emails, I must be tired.  This is the little
+ 234121 [gavin refine] Can you provide us with a few real-world cases where you would want to
| 234268 [shiwei.zhang] Thanks. My requirement is: I've had a method "logon(uid,
+ 234129 [shortcutter ] You can find a page linked from this Wiki page - currently our network
+ 234142 [vincent.four] =3E I think Function Overloading in C++ is very meaningful=2E And =3CBR=3E=
+ 234280 [GGarramuno a] It isn't.

^ using ruby in place of C
234082 [christopher.] "there is a C interface provided so that user codes can be written in C
+ 234084 [dido.sevilla] But you will have to work at writing a Ruby extension in C that uses
+ 234122 [shevegen lin] What are "user codes"?

^ newbie question about sets
234099 [slamboy gmai] I'm just curious if there's any way to duplicate values in a set.  After
+ 234100 [slamboy gmai] Doh!  first line of ri Set told me what I needed to know - that it's not
| 234101 [fxn hashref.] Yes, that implements sets as defined in math. What you wanted is
| 234103 [zack bononia] class MultiSet < Set
| 234105 [zack bononia] Answering to myself ...
| 234128 [shortcutter ] irb(main):001:0> multi_set = Hash.new 0
+ 234211 [danfinnie op] You shouldn't really have to avoid this.  The 6 letter word should be 6
  234216 [slamboy gmai] Current score: 5900

^ unpack 4 bytes to a signed integer
234104 [duzuike gmai] I' m using unpack to convert 4 bytes to local integer, but ruby just
+ 234109 [mike stok.ca] There are "i" and "I" for signed and unsigned integer respectively,
| 234118 [duzuike gmai] But the "i" and "I" modifer don't care bytes order.
| 234127 [mike stok.ca] OK then, what about "V"? "treat 4 characters as an unsigned long in
+ 234120 [erikveen gma] s = 0xFF.chr * 4
+ 234123 [erikveen gma] s = 0xFF.chr * 4
+ 234173 [vjoel path.b] The best way I've found is to unpack with N (to get the swapping right)
  234326 [duzuike gmai] I tried your codes, it works exactly as what I expected. I havn't

^ Array#modified
234106 [juozas tuesd] a = []
+ 234108 [rmagick gmai] Check out the Observable class in the standard library.
| 234111 [juozas tuesd] Thanks for your prompt reply. Unfortunately Observable is not what I'm
| 234126 [shevegen lin] "I'm assuming something like this exists (specifically for the Array
+ 234110 [ruby anthrop] You can sort of do this, but an object does not know what variable(s) it is
| 234114 [shortcutter ] Alternative approach would be to use Delegator to wrap an Array instance.
+ 234131 [flori nixe.p] class Changed
  234137 [juozas tuesd] I like this solution because it's short. However, it requires cloning

^ ANN: Rails UAE meeting #1 - January 2007
234130 [rbarazi gmai] Ruby on Rails has taken the development world by storm, and has been

^ Qtruby - calling a C application
234138 [fredrik.joha] I am writing a GUI with Qtruby, which is working great. I am also using
+ 234147 [richard.j.da] I've just downloaded the RTP sources, and see that they are very old
+ 234153 [vincent.four] If I understand you right, you're running an external application and
+ 234154 [vincent.four] If I understand you right, you're running an external application and
| 234294 [richard.j.da] Yes, you're right it is in Qt4, and it does sound possible to do what
+ 234295 [fredrik.joha] Thanks for helping! I think I am in over my head here though, after
  234296 [vincent.four] Well, I'm disappointed ;-). I hope you would try and explain us

^ [ANN] Ruby-VPI 15.0.1
234148 [ snk gna.org] Ruby-VPI is a Ruby interface to IEEE 1364-2005 Verilog VPI.

^ Silly codeing error
234152 [adrian hang1] I am a new programmer of ruby and am reading the pickaxe book. Working
+ 234156 [wilsonb gmai] Check the spelling there. :)
| 234200 [adrian hang1] Yes thank you I now know my error!!
+ 234157 [tim.pease gm] def initialize( name, artist, duration )
| 234197 [adrian hang1] Yes thank you I now know my error!!
+ 234161 [moose56 gmai] How have you spelt initialize??
  234198 [adrian hang1] Yes thank you I now know my error!!

^ Ruby on Mac OS X
234155 [damphyr free] Looking for pointers to installation guides for Ruby on Mac OS X.
+ 234158 [andy petdanc] I would (and do) use macports at http://www.macports.org/.  Then it's
+ 234159 [eoghanj gmai] Have a look at the macports site: http://www.macports.org/
| 234171 [lovethebomb ] If you don't want to use macports, hivelogic.com posted a guide to
| 234189 [ruby philip.] And here's an updated version of that... mostly it's just my notes from
+ 234379 [matt tidbits] I installed 1.8.5 on Tiger easily without using MacPorts or anything
+ 234602 [ryan NOSPAMe] I'm a Mac n00b who needed the same advice. First I found Fink but that
  + 234627 [olsonas gmai] I completely agree. The key here is that using MacPorts gives you a
  + 234644 [jameshcunnin] It didn't create a symbolic link because it wouldn't want to mess with

^ regex: \<start-of-word, and end-of-word\> not in gsub?
234163 [shea null.ne] I often use \< and \> to denote the start and end of word.  But they
234168 [rodrigo.berm] "xword1 word2 tword3".gsub( /\bword/, 'XXXX' )

^ Nuby question on Class Variable and Class Instance Variable
234169 [rubylearner ] class A
+ 234202 [slamboy gmai] subject of class variables on this list recently.  So, hopefully that
+ 234233 [gregory.t.br] article around a recent discussion of this on the list.

^ Q: How can a Rake task know the caller's directory?
234170 [james.britt ] I'm increasingly using rake files for common system tasks.  Since Rake
+ 234178 [vjoel path.b] No idea. One possible solution is to put a "stub" rakefile in the dir,
| 234209 [james.britt ] Right, that's the whole point.  For example, I have a Rake task that
| 234217 [transfire gm] how are you accessing "This is my log message" in your task?
| 234218 [james.britt ] ARGV.shift # remove the task name
| 234232 [jim weirichh] rake com MSG="This is my log message"
| + 234246 [transfire gm] why did you choose to use environment vars here. isn't that sort of
| | + 234312 [jim weirichh] The fact they look like environment variables is delibrate.  This allows
| | + 234344 [james graypr] rake com RAKE_MSG="This is my log message"
| |   234374 [transfire gm] Hmm... maybe. Think I'll just use a single env var and parse that I
| + 234251 [james.britt ] Right, but too much effort for the user.  Leaves too much room for James
|   234448 [llasram gmai] Not perfect, but you could make your 'r' shell alias a shell function
+ 234199 [GENIE prodig] Modify rake to log the initial working directory before doing anything
| + 234207 [james.britt ] I've hacked ruby apps in this manner before, but they are prone to "gem
| + 234215 [james.britt ] I've tried that out, and it works quite well.
+ 234231 [jim weirichh] task :whereami do
  + 234248 [gfunk913 gma] Checkmate, Mr. Weirich.  I looked in run/load_rakefile, but neglected to
  | 234313 [jim weirichh] You can thank Jim Freeze for suggesting this feature.
  + 234252 [james.britt ] Perfect.  Thanks!
  + 234356 [james.britt ] I had looked for such a method in ri and the Rake rdocs, but saw nothing
threads.html
top