371117-375751

370948-371996 subjects 371317-372187

[ANN] matz_en and matz_transrated twitter accounts
371117 [tony.arcieri] Many of you probably follow the matz_translated Twitter account, provided by
371119 [justincollin] ...

rspec-2.0.0.rc is released
371118 [dchelimsky@g] ...

Strip illegal characters from a file name
371123 [jack.zelig@g] I have a program which takes a users details and saves them in a pdf.
371126 [reachme@ch r] I've got a script that strips out invalid characters from TextMate
371152 [jack.zelig@g] Hey that's really cool.

Re: "require" no such file to load
371125 [b.candler@po] This means: ruby could not find any file called p030motorcycletest.rb in

Sinatra Application with ActivRecord 2.3.9 and MassAssignmen
371132 [astrid.kurbi] i tried my first sinatra application with ruby 1.9.2 and ActiveRecord
371135 [b.candler@po] ActiveRecord is a component of Rails; I suggest you ask on a Rails forum

Broken link check for Authenticated Url using http,uri
371133 [shahpriyank0] I work on check all links in a site, so for that i fetch all links from
371329 [sandor.szuec] and

Tooltip with css_tt
371147 [bianca.steph] Using "css_tt" gem, I was able to create a tooltip.
371150 [jeremy@bo p.] I'm not a CSS/HTML expert, but are you testing with the same version of
371227 [bianca.steph] Thanks for the answer.
371243 [jeremy@bo p.] This doesn't appear to be a general Ruby problem, so this is probably

what is easies gui to install ? - tk, gtk, fxruby etc
371157 [jrubiando@gm] What is the easiest gui to install and use with ruby such as tk, gtk,
+ 371160 [steve@st ve ] You can install qtruby by making sure you have qt4 installed, and then
| 371164 [jrubiando@gm] This is as far as I got .. thanks
+ 371162 [jude.dashiel] Snow Leopard on a Mac!  Even if you're totally blind you can do it

Gem Mirror Yaml file
371165 [valblade@gm ] I do not succeed building the index (gem generate_index) (lake of
371179 [valblade@gm ] Reply is in

win32ole adodb.command AffectedRows howto?
371167 [lmuellerhome] Greetings,

Calling a method with an instance
371168 [prpaulroche@] instance that calls the instance. Here's my code.....
+ 371172 [jrubiando@gm] dis1.discount_amount(dis1.amount, discount)
| 371173 [jrubiando@gm] this works, but not sure if this approach is most sensible
| + 371175 [prpaulroche@] Thanks for this. What is the best way to go about dealing with a method
| | 371178 [jeremy@bo p.] I think the comment about sensibility regards the passing of an object's
| + 371176 [wagner.andre] Um, I think you guys mean
+ 371174 [jeremy@bo p.] There are a couple issues.  First of all, you are trying to use two

how to get rpm file with ruby ?
371171 [jrubiando@gm] Neither of the methods below are able to download this rpm file. If
371180 [b.candler@po] Please post the exact error message you see (or other symptom - e.g.

WE R HOT COUPLES AND SEARCHING FOR HOT MAN, WOMAN OR COUPLES FOR REAL
371177 [iamforufrien] WE R HOT COUPLES AND SEARCHING FOR HOT MAN, WOMAN OR COUPLES FOR REAL
371182 [lparravi@gm ] $ gem install orgasmastron

How can I count number of elements in an HTML page
371181 [tester.paul@] want to count the number of items in a list on the page.  The
+ 371183 [jgabrielygal] I'd use Nokogiri. Off the top of my head, it would be something like (untes=
| 371208 [jgabrielygal] I am now at my computer so I can test this. It seems that
| 371224 [jazzezravi@g] The "jazzez" gem lists -- Count for each and every html tag.
| 371225 [jazzezravi@g] 3. Get the Html tags
+ 371184 [astahl@hi .c] Nokogiri allows direct access to HTML elements as data.  I use it a lot
+ 371185 [seanh1313@tx] I would say if you aren't exactly concerned with the content of the row.  Perhaps just counting the number of lines in the array?  I guess you would have to read in the page line by line...but that isn't too hard.
+ 371199 [angel_steel@] $html.scan(%r{<div.*first section.*</div>}m).to_s.scan(/<li>/).size
  371462 [tester.paul@] Thanks Steel.  This worked fine.  I just needed to make it a lazy
  + 371478 [jgabrielygal] You have to be careful, then, about all the possible combinations that
  + 371479 [josh.cheek@g] I would try REXML, then. It's an XML parser in the standard library.

win32ole with Outlook2010 read email
371186 [dejan1@gm il] I am using the first script from this blog to read email from my inbox

soap4r orders multi-element sequences incorrectly?
371189 [jzipperle@gm] I'm building an app using soap4r v1.5.8 and I've generated client stubs
+ 375638 [jomeara@ta e] Were you able to resolve this issue?  I have run into a similar problem
+ 375640 [jzipperle@gm] I ended up writing a workaround that (so far) fixes the issue in my
+ 375751 [jomeara@ta e] Thanks Justin.  Very much appreciated.

How to call a method within another method
371190 [prpaulroche@] def  make_pay_loan
371194 [jeremy@bo p.] I think you want to dynamically define one method from within another.
371201 [ryand-ruby@z] But there is nothing dynamic about that solution. All you're doing is =
371203 [jeremy@bo p.] All I'm doing is attempting to answer the question as asked without

Writing a Nim game in ruby
371192 [kingkongkill] wondering does anyone know how to help with this problem
371193 [astahl@hi .c] Uhh, what kind of help are you looking for?  Or did you just want
371212 [kingkongkill] Very true sir but I was short on time and if someone had already done it

Any XMLRPC library you can recomend?
371198 [albertschlef] I'm looking for an XMLRPC library. I don't need something fancy.

confused: instances or arrays?
371200 [prpaulroche@] Client
371205 [jeremy@bo p.] The is_client_solvent? method is therefore equivalent to the bankrupt
371213 [shortcutter@] I'd rather say "object relationships" because that is the more general

Error  defining UI_need help urgently
371210 [datulravi@gm] Please find the .txt file attached. I have been trying to build a
371219 [martindemell] You're missing a closing quote in your definition of prompt4. (A good
371237 [datulravi@gm] Thanks martin... I moified it like u said but am getting the same error
371260 [martindemell] Do you have a syntax highlighting and indenting editor, or a ruby

how do i detect END OF FILE file in ruby
371215 [amittomer25@] i would like to know how do i detect END OF FILE file in
+ 371217 [jgabrielygal] Usually the ways of reading a file in Ruby are higher level, where the
| 371220 [amittomer25@] Am looking to configure mongrels's http_request.rb in
+ 371299 [devguy.ca@gm] you can use IO.eof?

setting local variables in a binding
371221 [martindemell] Why does this not work?
+ 371232 [b.candler@po] irb(main):001:0> b = binding
| 371256 [martindemell] Yes, didn't work there either. Didn't think to try 1.8 - wonder why
+ 371262 [john.sikora@] irb(main):001:0> x=4
| 371267 [martindemell] ruby-1.9.2-p0 > x = 5
| 371274 [tony.arcieri] Note that "binding" is the default argument of eval if you don't specify
| 371302 [john.sikora@] You are correct but the problem 'persists'. The following irb session in
| 371350 [shortcutter@] The reason is that Ruby looks at the source code to find out which are
| 371408 [john.sikora@] I mean that I have seen examples where people use, say '@var', outside
| 371418 [shortcutter@] So you have something like
| 371474 [john.sikora@] I don't like to top post even a little bit, but I want to apologize for
| 371522 [shortcutter@] Fluent speaking of Ruby makes it somewhat easier but even for me the
| 371757 [john.sikora@] Your remarks are always useful, and I appreciate them.
| 371796 [shortcutter@] In case you get two copies of this: First send attempt was returned by
+ 371792 [john.sikora@] By the way, I've been busy and not checking the forums too much lately.

Another issue with spamassassin
371223 [shortcutter@] that's the second time I get a reply like this.  Is there a way to
371795 [shortcutter@] This is the mail system at host carbon.ruby-lang.org.
371813 [brabuhr@gm i] in

XML-RPC WEBrick problem (error during method invocation)
371226 [moog_master@] I have a university assignement, and i am stuck. I am supposed to create
371265 [jeremy@bo p.] The server code is incomplete.  I managed to get something to work and
+ 371276 [moog_master@] Well, the problem for me is that i already know i am close. I was
| + 371304 [albertschlef] "watch the output of your server while you run your client". Look at
| + 371316 [jeremy@bo p.] The problem is that you are so near to finding the solution to your
|   371359 [moog_master@] Look closer at that server output, and don't discount anything out of
|   371362 [moog_master@] Scratch that, i figured that part out. I was just having type errors
+ 371368 [moog_master@] I attempted a fresh start without using WEBrick.
  371370 [moog_master@] i would love to have the facepalming moment myself :D
  371383 [jeremy@bo p.] Excellent!  In your original example you were doing exactly that with

Another Ruby Conf Speaker needing to pull out the Tin Cup.
371238 [rick.denatal] Ellie,
371465 [eleanor@ga e] can now afford not only my roundtrip flight from London to New Orleans =

"map" a deeply nested structure: Object#deep_map
371239 [guidoderosa@] most of you probably know/use Ruby Facets
371241 [shortcutter@] 15a35f06af36
371247 [guidoderosa@] I was not interested in mapping keys, but this would be a reasonable
371324 [shortcutter@] OTOH you say you want to mimic #map behavior and since this is part of
371333 [guidoderosa@] Right.
+ 371334 [guidoderosa@] Ouch! It actually returns an Array of key-value pairs. Sorry for the
+ 371335 [shortcutter@] CYGWIN_NT-5.1 padrklemme2 1.7.7(0.230/5/3) 2010-08-31 09:58 i686 Cygwin
  371352 [guidoderosa@] This is embarrassing but I'm thinking - right now - that I made some
  371380 [transfire@gm] Perhaps what is being sought here is a form of search and replace.
  371391 [guidoderosa@] Here's a deeply nested object; replace any "content" n which is a
  371403 [transfire@gm] Indeed there is. In fact that is something akin to how the new Facets

runtime evaluation of variables
371242 [romaric.ludi] I'm currently working with ruby and set_trace_func function. I need to

RDoc doesn't create diagrams
371244 [tasos.laskos] I'm having a problem with rdoc.

named parameters in ruby?
371246 [chuchelo@gm ] Ruby does not support named parameter for now as all of you know.
+ 371377 [shortcutter@] That's really the best solution available today.
+ 371399 [b.candler@po] a = A.new
  371423 [mentionuse@g] One thing to remember about this idiom is what happens when you try

progromatic download of rpm file
371249 [jrubiando@gm] not sure why neither of these ways to download an rpm from ruby don't
371251 [jgabrielygal] require 'open-uri'

A Real World example for Ruby to "compiled" version discussion
371250 [phil@pr co .] People,
+ 371291 [ryand-ruby@z] looked at (eg RubyInline) is that the performance problem comes in in =
| 371355 [shortcutter@] ked at (eg RubyInline) is that the performance problem comes in in repeatin=
| 371430 [phil@pr co .] People,
| + 371438 [cmdjackryan@] [snip /]
| | + 371443 [phil@pr co .] Phillip,
| | + 372353 [headius@he d] Re JRuby: Eventually, yes...the current compiler is largely unchanged
| + 371466 [joelvanderwe] Traffic simulation has an analogous distinction: microscopic (traffic as
|   371470 [phil@pr co .] Joel.
+ 371372 [wruyahoo05@c] How much data is carried for each individual? a few alleles? a lot? the

UnboundMethod#source_location in Ruby 1.8.7
371252 [transfire@gm] Any way to emulate UnboundMethod#source_location in Ruby 1.8.7? I am

interesting irb experiment
371254 [jude.dashiel] J=3D126*rand+33.round
+ 371258 [b.candler@po] You're not showing actual copy-pasted code nor error message, but at a
+ 371259 [stefano.croc] I don't know what you want to obtain. If you want the character with code
  371263 [jude.dashiel] Brian, thanks for the reminder on rand() notation, I was able to use

Error when using class variables with operators
371255 [prpaulroche@] message........
371257 [stefano.croc] It means that @@target1 is nil. Try
371261 [prpaulroche@] The problem is I intialise the attributes first.......
+ 371268 [jeremy@bo p.] You don't need @@ in order to make off_target accessible.  That method
| 371271 [jeremy@bo p.] Hmm.  Looking closer at what you're trying to do, I see that you do need
| 371278 [prpaulroche@] Thanks guys for the help. Stefano, I stuck a 'p' in and I got a nil.
+ 371269 [stefano.croc] I truly can't understand how your code should work. However, here are some

urgent help needed! unable to locate syntax errors
371264 [datulravi@gm] Please find the txt file for the ruby program attached.
+ 371272 [devguy.ca@gm] you should learn to read the error message it's telling you were the
+ 371273 [martindemell] Your code has a bunch of errors, all of which will need to be fixed.

[ANN]  October Phoenix Ruby User Group Meeting
371270 [james.britt@] October Phoenix Ruby User Group Meeting

minitest randomization
371277 [alexch@gm il] Minitest was intended to be a minimal replacement for Test::Unit and =
+ 371285 [steve@st ve ] The best solution would be to make the execution random, but the
| 371290 [ryand-ruby@z] that's not a bad idea at all... but it would be DAMN confusing if you =
+ 371289 [ryand-ruby@z] which a single test is failing.
  371482 [alexch@gm il] Sorry, read "wc" wrong -- they both have about 1100 lines of code.
  371512 [alexch@gm il] ...
  + 371516 [ryand-ruby@z] Idempotency is a red-herring. There is nothing about the xunit =
  | + 371518 [colinb2r@go ] I haven't made any psychological tests on this, but I suspect that if I'm
  | | 371530 [ryand-ruby@z] output be
  | + 371537 [redstun@gm i] when running in console, is it possible to highlight test failures/errors
  |   371687 [ryand-ruby@z] failures/errors
  + 371540 [alexch@gm il] (Apologies if the quotes don't come out right in plain text -- I'm using

looping through array starting at i !=0
371279 [edvelez.g@gm] I want to loop through this array, but not for every index.. only
371282 [becker@qa is] @weights[2..-1].each_index{|i|
371349 [shortcutter@] That would be

Missing @ for instace variable in class, but no error message
371280 [mail@ss le s] Some days ago I was defining a class, but forgot to use the leading @
+ 371281 [tony.arcieri] attr_accessor defines the Test#a method which is a getter for the @a
+ 371283 [wagner.andre] attr_accessor actually defines a public instance method, named 'a'. That
  371284 [jeremy@bo p.] Beware of attempting to use the bare a= accessor within an instance
  371305 [john.sikora@] Jeremy raises an excellent point. I wish I had read this post a few days
  371308 [jeremy@bo p.] Thanks go to Dave Thomas, Chad Fowler, Andy Hunt, and their book

Why does Module#include exclude the module's metaclass?
371286 [jrmair@gm il] When classes are inherited in Ruby the singleton classes are also
+ 371288 [botpena@gm i] ok. single inheritance
| 371292 [jrmair@gm il] Hehe,
| 371297 [botpena@gm i] single inheritance for class includes their singletons. single class
+ 371294 [shyouhei@ru ] The former.
| 371300 [jrmair@gm il] Thanks for your reply.
| 371351 [shyouhei@ru ] =20
| 371360 [jrmair@gm il] @Urabe,
+ 371311 [transfire@gm] For no good reason other than a purely theoretical misconception
  + 371314 [botpena@gm i] matz has humbly commented on this...
  + 371320 [jrmair@gm il] @Thomas,

how many seconds old am i?
371293 [penta2100@ho] for some reason line 6 doesnt work.i converted it into a integer but
+ 371296 [penta2100@ho] heres the file
| 371295 [penta2100@ho] wrong one.lol
+ 371298 [astahl@hi .c] You didn't save the result of .to_i.
  371306 [ryand-ruby@z] As much as I dislike doing someone's homework for them... *shudder* I =
  + 371313 [albertschlef] Are you... 240 years old?
  | + 371319 [cmdjackryan@] You forgot to account for the lack of 400 seconds  (6.666... minutes!) a day. ;)
  | + 371363 [rick.denatal] That might explain why Ryan seems to get, shall we say, a bit
  |   371394 [ryand-ruby@z] Pththththt
  + 371397 [penta2100@ho] This isn't homework. i was doing a tutorial and it said make a app that

rescuing a function
371301 [courtlandall] I've normally handled exceptions by "rescuing functions" in roughly this
371303 [dhruva.sagar] Are you sure that you don't have *args in your code instead of just args ?
371307 [jeremy@bo p.] Actually, *args is certain to be initialized.  If no arguments are
+ 371309 [courtlandall] Yep it still gives a warning when I define a default value for the argument,
| 371348 [shortcutter@] Yes, certainly.  You could open a bug report.  What IDE is it?
+ 371312 [dhruva.sagar] Interesting...yea I didn't think of that

Benchmarks Project and example for `||=`
371310 [transfire@gm] Has anyone ever put together a suite of benchmarks that simply measure
371315 [ammarabuali@] It would be interesting to have performance comparisons of the various
371369 [transfire@gm] out
371387 [jeremy@bo p.] The issue is one of relevance though.  Of course using ||= is slower
+ 371389 [rick.denatal] It struck me as odd that Trans is benchmarking two different things
+ 371390 [rick.denatal] It struck me as odd that Trans is benchmarking two different things
  371402 [transfire@gm] re
  + 371404 [jeremy@bo p.] Take a look at
  + 371407 [ryand-ruby@z] There is a damn good reason why lazy initializing exists in the first =
    371410 [transfire@gm] ce, and it invalidates your statement above.
threads.html
top