379766-401793 subjects 380220-387092

Is there a way to use "minitest/spec" with Rails 3?
380005 [peter.havens] Is there a straight forward way yet to use "minitest/spec" (either
380067 [aaron@te de ] Probably needs more work to get running with functional / integration

Replacing elements in an array?
380007 [jen.bottom@g] This question is following on from my post 'making an array of arrays?',
+ 380009 [jgabrielygal] but
| 380027 [jen.bottom@g] When I run
| + 380028 [g.diemant@gm] So a board is an array of arrays and offspring holds three boards.
| + 380029 [jgabrielygal] ce
|   380045 [jen.bottom@g] Thanks to everyone who posted for the advice.
+ 380011 [jp.billaud@g] Your code should work just fine. How did you initialize the @offspring
  380022 [jen.bottom@g] def create_pop

What is p's real behavior?
380008 [raincolee@gm] For each object, directly writes *obj*.inspect followed by the current
380012 [jgabrielygal] void
+ 380024 [fxn@ha hr f.] puts and p do not honor $\, print does.
+ 380025 [ryand-ruby@z] current
  380026 [ryand-ruby@z] current

no implicit conversion to float from string
380015 [borg.stef@gm] I have this program where there is float numbers in x and y which are
+ 380016 [hassan.schro] Are you sure?
+ 380017 [borg.stef@gm] sorry i mean .to_f
+ 380020 [borg.stef@gm] yes thanks :)

[ANN] launchy 1.0.0 Released
380031 [jeremy@hi eg] launchy version 1.0.0
380111 [groups@in ox] I see that Launchy is correctly using xdg-open when applicable - very
380153 [jeremy@hi eg] Yup, and it has since day 1 :-).

Subject: [ANN] rubypython 0.5.1 Released
380034 [halostatue@g] rubypython version 0.5.1 has been released!

"10 Minutes to Your First Ruby Application" Deconstructed!
380035 [shangbaby@gm] I am a newbie to Ruby (That Rhymes!). I am attempting to complete the
+ 380040 [jgabrielygal] First of all: initialize, run, select_launcher and file_type
| 380062 [shangbaby@gm] Muchos Gracias Jesus I do appreciate your time. Thank you for responding to my post.
+ 380063 [ryand-ruby@z] It might be worth your time to check out Chris Pine's book "Learn to =
+ 380064 [bbxx789_05ss] devX.com is one of the worst websites for learning anything about

matching a word in any number of characters
380037 [code@ap th o] I have need of some code to match any of a number of words in any number
+ 380038 [ryand-ruby@z] number
| 380042 [code@ap th o] I find your attitude distasteful.  Have you tried being a pleasant human
| 380043 [andrea@an re] Well, good advice is good advice and Ryan gave you plenty, for free. In this
| 380044 [code@ap th o] =20
| + 380046 [ryand-ruby@z] *asshole*;
| | 380048 [code@ap th o] Really?  Please direct me to where I was being an asshole.  If it's on
| | 380050 [code@ap th o] Okay, never mind -- I found one instance where you called me an "ass".  I
| + 380047 [andrea@an re] I probably expressed myself badly. Certainly, being an asshole is not a
|   380049 [code@ap th o] Thanks for clarifying that.  I was uncertain how you meant what you said,
+ 380065 [bbxx789_05ss] They may be able to write perl in their sleep, but they don't know jack
  380066 [code@ap th o] =20

Net::LDAP Next Release & Project Governance
380052 [halostatue@g] I. The next release of Net::LDAP will be on 2011.03.21. If you have

Array range values assignment
380053 [sweensonti@g] a = ["A","A","A","A","A", "A","A","A","A","A"]
+ 380054 [g.diemant@gm] Just
+ 380055 [sweensonti@g] I understand that :)
+ 380056 [sweensonti@g] b = []
| + 380057 [jeremy@bo p.] 3...7.each { |i| a[i] = "B" }
| + 380060 [botpena@gm i] in some cases, specifying the starting and  the length may be also handy, e=
+ 380058 [sweensonti@g] Jeremy,
+ 380061 [me@ch it ny ] You can use the fill method in the Array class

Taking a model to particular coordinates
380059 [borg.stef@gm] So I want to import a model and then take it to particular x and y

Missing space leads to different result
380069 [lasso@la so ] Yesterday I introduced a bug in one of my scripts after accidentally
380070 [chris@ch is ] Removing the space causes the minus to be interpreted as a unary negative
380071 [lasso@la so ] Ah...thanks!

An Idea of teaching Ruby online using WinK :: Help with Table of Contents
380072 [information.] I have been playing with ruby since some time.

accessing object contents
380073 [fleshins@gm ] given
+ 380075 [mayank.kohal] Override the to_s method in your class and define it to print out the value
+ 380079 [b.candler@po] Is that output from irb? irb uses the "inspect" method to display a

Method Call from inside a file.
380074 [tridib04@gm ] I coded a new method within gc.c file defining as--
+ 380080 [b.candler@po] rb_define_method().
| 380125 [tridib04@gm ] Where should add this line within that function or create a new one
| 380184 [timr@pr bo c] Really, 30 seconds with Google would have answered this question 20 times
+ 380534 [tridib04@gm ] Okay i searched everywhere in Google but they are suggesting me to
| 380547 [b.candler@po] Click on that link. Read it all. Look where they call
+ 380754 [tridib04@gm ] Thanks a lot it is working and giving me the desired output.
| 380760 [b.candler@po] "Now look at the last function, Init_Test. Every class or module defines
| 380761 [tridib04@gm ] Your code will be either compiled into a shared library (.so or .dll),
| 380778 [b.candler@po] I believe you're writing C code for use by ruby. Ruby doesn't provide
+ 381734 [tridib04@gm ] collection.

Fwd: Using value from variable in .times method?
380076 [jen.bottom@g] I have a variable that stores the population input by a user. I then

Re: Using value from variable in .times method?
380077 [johnf@bi sb ] Yes. Make sure the value you're storing in @pop is a Fixnum. What's
+ 380078 [b.candler@po] Or any Integer value in fact.
+ 380082 [jen.bottom@g] I confess I don't know a lot of the technical stuff about class Fixnum,
  + 380083 [hassan.schro] Time to learn :-)
  + 380084 [jeremy@bo p.] You should take a little time and learn a bit more detail about numbers
    380098 [jen.bottom@g] puts pop.class

A question about Ruby 1.9's "external encoding"
380085 [albertschlef] p Encoding.default_external
+ 380099 [shortcutter@] io.external_encoding   => encoding
| 380101 [b.candler@po] No, it doesn't.
| 380107 [shortcutter@] So, which encoding is used then?  An encoding *has* to be used because
| 380110 [b.candler@po] None.
| 380144 [shortcutter@] Even if no encoding is used explicitly an encoding must be used
| 380229 [markus@fi ch] Is it just me or does this, especially point 2, sound highly confusing
| 380237 [shortcutter@] The rule as such is pretty clear IMHO.  It does not meet "naive"
| 380246 [albertschlef] irb(main):043:0> utf = "\u05D0"  # Alef
| 380248 [shortcutter@] irb(main):008:0> utf.length
+ 380100 [b.candler@po] Depends what you mean by "shouldn't be". The rules for encodings in ruby

Reading a 64-but double in a file
380087 [ralphs@do 32] I have a file I need to read.
380089 [jeremy@bo p.] Assuming you're running with a 64-bit enabled Ruby and the bytes in the
380097 [ralphs@do 32] May the gods bless you, Jeremy.   Exactly the answer I was looking for.

newbie understanding blocks
380090 [neubyr@gm il] I am learning Ruby and having some difficulty understanding blocks. I
+ 380091 [jeremy@bo p.] The round method does not use a block.  As with most methods that don't
| 380092 [neubyr@gm il] Thanks for explaining it in detail Jeremy. That's helpful.
| 380095 [jeremy@bo p.] No, think of a block as yet another argument to a method.  The value of
+ 380096 [neubyr@gm il] Great! Thanks a lot for explaining the workflow here - I wasn't
+ 380120 [bbxx789_05ss] You can think of a block as a method with no name.  A block gets passed

Name generator | I need feedback
380103 [justin.domin] I created a name generator in Ruby. Basically, I have a file
+ 380105 [anurag08priy] A better alternative since the block invocation automatically takes
+ 380114 [justin.domin] Thanks a lot anurag! Your answer is exactly what I wanted =)
| 380115 [anurag08priy] It is easier to refer docs for such questions :).
| 380124 [Rob@Ag le on] ...But if you need 'w', you can specify the mode yourself rather than
+ 380130 [danfan46@ho ] The important thing is not to make the code look smart and condensed.
  380324 [justin.domin] Thanks a lot! Your second methods looks quite effective. I'll study your

How to install a gem locally ?
380106 [fabrisss@gm ] I'm developing a ruby gem that I would like to build and install LOCALLY
+ 380108 [luislavena@g] You can verify the gem contents doing "gem spec gemname files"
+ 380109 [sebastian@va] Hej Fabrice,
+ 380112 [fabrisss@gm ] gem build gemname.gemspec
+ 380161 [drbrain@se m] The contents command is currently broken.  It will be fixed in the next =
+ 380216 [fabrisss@gm ] Nice to know, thank you !

The best practices to learn Ruby
380116 [fs_tigre@ho ] I'm currently trying to learn Ruby by watching tutorial reading books an
+ 380121 [jakekaiden@g] i'd say the best way to learn ruby, just like anything else is to dive
+ 380123 [fs_tigre@ho ] Thanks a lot for your comments!
+ 380129 [code@ap th o] Here's an article that discusses some of the books and other resources
+ 380136 [steve@st ve ] I specifically run a project about teaching Ruby: http://hackety-hack.com/
| 380137 [larocque.bra] Every time I've used hackety-hack, I've always run into show-stopping bugs.
| 380138 [steve@st ve ] Windows? My bad, I'm working on the stability. Damn Ruby 1.9.1... of course,
+ 380139 [fs_tigre@ho ] Thank you all very much for your help.
| 380141 [chris@ch is ] Running the script requires a Ruby interpreter of some kind.  So the author
+ 380148 [fs_tigre@ho ] Thank you all very much!
| 380152 [shortcutter@] Well, is there anything writing textual log files where you work?  If so
+ 380151 [gregory.t.br] There are lots of ways to practice, and a lot of places to do it. It
+ 380178 [fs_tigre@ho ] Thank a lot Gregory Brown for the good info.
| 380181 [cmdjackryan@] Well, depending on your personal pain-threshold, there's several Ruby
+ 380183 [jakekaiden@g] don't be afraid of the gui!  (screenshot attached)  all-ruby, and it
+ 380195 [fs_tigre@ho ] Wow! nice, was it done all in Ruby? What did you use as GUI, FXRuby,
| 380200 [jakekaiden@g] thanks - yep, all done in ruby (i don't know anything else!)  i use
| 380202 [josh.cheek@g] That is incredibly cool and inspiring ^_^
+ 380201 [jakekaiden@g] thanks - yep, all done in ruby (i don't know anything else!)  i use
+ 380204 [fs_tigre@ho ] Thanks a lot for the info!
+ 380333 [matt@ti bi s] It wasn't easy, so after I finally figured out what was going on, I
+ 380357 [fs_tigre@ho ] Thank you I'm currently reading your tutorial, very nice.

Need to find list of things in a file
380117 [flethuseo@gm] I am wondering how would you make a program to find a list of things
+ 380118 [bbxx789_05ss] Sorry, you don't add anything to a file--you can only read a file and
+ 380119 [usenet@is ik] first file

Logical OR in Ruby
380126 [paul.sholtz@] I'm looking at some source code, to try and understand it.
+ 380127 [pat.eyler@gm] yes.
+ 380128 [adgar@ca bo ] More specifically, || returns the second operand when the first operand =
+ 380145 [stefano.miol] Yep, as others told you.
+ 380147 [colinb2r@go ] which (providing I'm reading Rick DeNatale's blog correctly) tells us that

Can't pass test test_drbssl.rb after compilation
380131 [andrusha@gm ] I want to package ruby.
380132 [andrusha@gm ] 14838 pts/3    SN+    0:00  |                                   \_

String split into an array
380133 [skully@gm .c] is it possible to do something like that in ruby?
+ 380134 [rimantas@gm ] is it possible to do something like that in ruby?
+ 380135 [skully@gm .c] just write *nodes like

Re: rubygems-update 1.6.0 Released
380140 [rogerpack200] Cool thanks for the release.
380162 [drbrain@se m] more=20
381603 [rogerpack200] Yeah with some benchmarking this doesn't seem to be the general problem,

Ruby Summer of Code
380142 [dsisnero@gm ] Google is starting their summer of code again.  Is ruby going to have a
380150 [serialhex@gm] I would also like to know if there is going to be a Ruby Summer of Code.

unable to run ruby in eclise helios
380143 [chitrapu.bha] I want to Debug/Run ruby and Watir scripts in eclipse helios.I  have

scope of assignments with lambda
380149 [r@al m. it e] This isn't a question -- it's just a comment that I find it awesome and
+ 380171 [durham.coho@] For a real eye-opener, see this discussion from 2007.
| 380175 [albertschlef] Thanks. Here's an alternative link, for those who have trouble with the
| 380228 [markus@fi ch] Thanks that you mention it, I was able to see that groups was loading
+ 380172 [bbxx789_05ss] How does recursion grab you?
  380224 [r@al m. it e] @7stud: Pardon if I wasn't clear in my OP, but I was asking about
  + 380230 [bbxx789_05ss] My point was that a recursive method seems harder to explain than your
  | 381604 [r@al m. it e] Yeah, well, I apologize, but that was my typo.  I meant "I *wasn't*
  + 381610 [kevin.mahler] "The scoping of variables in assignment" is exactly the same in both

Run CGI scripts in own webserver
380156 [kevin_de_val] Does anybody know how I can run ruby cgi scripts in my web server. I
+ 380165 [sophrinix@gm] CGI is part of standard lib. try ruby uses it (until i can get a sessions
| + 380176 [albertschlef] He can use Sinatra or some other Rack-based framework. Rack supports the
| + 380179 [sophrinix@gm] the /public directory is the ruby CGI 1.9.2 based version. it will show you
+ 380170 [cmdjackryan@] That depends on your webserver. Apache has the fast_cgi module, which
| 380177 [bbxx789_05ss] Posted via http://www.ruby-forum.com/.
| 380180 [cmdjackryan@] Which I failed to parse completely. *d'oh*
+ 380189 [b.candler@po] See also RFC 3875

Search files on windows shares
380157 [teedubb@gm i] Did some googling and didn't see much on this topic, any ideas?
380159 [teedubb@gm i] I feel like I can solve this problem once I figure out how to connect to
380292 [shortcutter@] Depends on your platform.  On cygwin you just do
380293 [hyagni@gm il] You can mount your NAS to Z:\ or Y:\ or ...

Counting values in an array, storing in a hash then making an array of hashes?
380158 [jen.bottom@g] Apologies but i've run in to another problem while attempting to make a
+ 380173 [bbxx789_05ss] totals = Hash.new(0)
+ 380174 [bbxx789_05ss] 3)
+ 380247 [shortcutter@] I'm not 100% positive that this is what you want, but it looks

fxri for windows?
380160 [smiley.mikey] I bought a book, Apress Beginning Ruby from Novice to Professional
+ 380168 [albertschlef] I don't have an answer for you (I'm not using Windows), but I thought
+ 380222 [alexandermcm] ...
  380223 [dheitzman@ie] I can't say enough good things about geany, the editor that was forked
  380225 [martindemell] Notepad++ [http://notepad-plus-plus.org/] seems to be a more native

[ANN] raindrops 0.6.0 - TCP/UNIX listen queue stats for Linux
380163 [normalperson] Polishing up the last (0.5.0) release
380164 [ben@bl yt in] Once upon a time (v0.4.1) raindrops would build on osx. At the time I
380166 [normalperson] Oops, looks like I forgot to guard the TCP_INFO stuff properly
380167 [ben@bl yt in] It does fix it! Thanks for the quick turnaround!
380169 [normalperson] No problem, thanks for the report. I just pushed out 0.6.1

[ANN] net-ldap 0.2 Released
380186 [halostatue@g] net-ldap version 0.2 has been released!

Difference between for and someclass.each do |var|
380190 [tyrel@cl ud ] I come from the low level C land and I am really loving ruby but I am
+ 380191 [sebastian@va] Hej Tyrel,
| + 380193 [shortcutter@] a=3D%w{foo bar}
| + 380194 [nobuoka@r- e] In a for/in loop, you need not call #each method.
+ 380192 [tyrel@cl ud ] Thank you its all starting to steep in...I think

summing values in a hash?
380196 [jen.bottom@g] Is there an inbuilt method to sum all values in a hash and return the
+ 380197 [mentionuse@g] You could try
| 380199 [shortcutter@] You should rather use a different idiom because your solution breaks
| 380203 [robert.dober] slightly better, because working ;)
| 380207 [shortcutter@] What do you mean by that?  Where was my solution not working?
| 380212 [robert.dober] jruby -e 'p( {:a=>42}.inject(0){|a,b|a+b})'
| 380218 [shortcutter@] My code explicitly included #values so it would not be affected by the
+ 380198 [andrea@an re] hash = { :a => 1, :b => 6, :c => 20 }
+ 380213 [colinb2r@go ] 1. it may be quicker than searching for an "inbuilt" method;

How could I make the Ruby 1.9 string ignore the invalid utf-8 byte sequence in split?
380205 [wenhao.xu@gm] Dear buddies,
+ 380206 [wenhao.xu@gm] Sorry, I just mis-sent the half-typed mail by a short-cut in gmail.
| 380208 [shortcutter@] Did you?  I can't seem to find it.
| 380209 [wenhao.xu@gm] Anyway, let me resend it again.
+ 380211 [yimutang@gm ] Maybe you should not encode the data from its external_encoding to
| 380214 [wenhao.xu@gm] I don't think that's the problem. It is probably a file with utf-8
+ 380215 [yimutang@gm ] I am working with Chinese character radicals.
  380226 [ryand-ruby@z] This sounds like it might be a legitimate bug. Can you file a ticket on =