263200-269507

263034-264024 subjects 263396-353572

Getting the 'Sender' or 'Caller' object of a method
263200 [peterlaurens] I am not having much luck in finding out how to get the calling object
+ 263203 [shortcutter@] Depends on what you want to do.  If it's for debugging purposes you
+ 263206 [robert.dober] Hmm maybe binding_of_caller might help, as far as I know Facet
| + 263207 [peterlaurens] Thanks to the both of you - it appears as though my best way to do this
| + 263239 [ben@bl yt in] IIRC, binding of caller hasn't worked since 1.8.4.  It relied on a bug
|   263240 [ben@bl yt in] My mistake, I was thinking of Binding#of_caller, which was a different
+ 263208 [ed.odanow@wo] I'm not sure to understand what you mean, because inside a method
+ 263228 [ara.t.howard] require 'binding_of_caller'
  263236 [transfire@gm] def method(&b)
  263256 [ara.t.howard] ??
  263258 [robert.dober] yup, Tom asks us to kindly pass him a block
  263261 [ara.t.howard] ah.  i mis-read that.  it *is* very useful.  thanks.

Re: Numbers Can Be Words (#133)
263201 [doodpants@ma] I'm not sure why this quiz is being phrased as "numbers that are
263204 [james@gr yp ] That's pretty much the quiz, yes.  It's not too hard to solve, but
263210 [novakps@gm i] There is no end of numerological[0,1] variations that could be used by
263413 [kbloom@gm il] Well then, along those lines I have a Hebrew gematria counter. Give it

ModRuby Init Handler
263221 [veejar.net@g] Apache 2.2.4

ModRuby Init Handler
263222 [veejar.net@g] Apache 2.2.4
263701 [galecho@gm i] Are you trying to run Ruby scripts on Apache ?

Can I intercept "instance variable XYZ not initialized"
263224 [lfast@md i. ] I'm working with Test::Unit and want to reduce the amount of noise in

Beginner with a question.
263226 [clockwork@si] ...
+ 263229 [dangerwillro] Very simple actually,
+ 263230 [jameskilton@] ...
+ 263231 [damnbigman@g] ...
+ 263232 [tim.pease@gm] Ruby does not implicitly convert Integers into Strings. You need to
  263238 [clockwork@si] ...
  263246 [tim.pease@gm] Take a look at this section on Strings from the Programming Ruby book ...

Keylogging in Ruby
263234 [ari@ar br wn] Keylogging in Ruby

Running multiple closures per iteration
263235 [joshchia@gm ] Is there a way to run more than one closure per iteration through a
+ 263237 [vjoel@pa h. ] Did you mean
| 263244 [joshchia@gm ] No, I meant to compute two different things from a.
| 263247 [tim.pease@gm] Well, it's not pretty, but here's my best shot at it
| 263329 [SimonKroeger] you can beautify this to
+ 263266 [stefano.cobi] a.inject(0) {|s, x| s + x}
  263267 [dblack@ru yp] a.each { |x| p << x if x >= 0; o += x }
  263324 [dohzya@gm il] def truc( a, sel, &inj )

How to find out the number of pattern matched?
263249 [chen_li3@ya ] I search a pattern in a string. How do I know how many times the pattern
263251 [sepp2k@go gl] string.scan(pattern).length
263272 [chen_li3@ya ] Thanks,

ruby on the zaurus
263250 [sy1234@gm il] I'm happy with the older ruby 1.8.4 which I have for my Zaurus
+ 263253 [greg.kujawa@] Good question. Several years ago I did some Ruby programming on a
| 263257 [greg.kujawa@] I have Ruby 1.8.3 on my SL-5500 and it appears as if ruby-devel is on
| 263259 [phlip2005@gm] I heard that someone (possibly one of you) got my MiniRubyWiki working
| + 263260 [greg.kujawa@] If you're lucky you can get one on eBay. They are becoming scarcer
| | 263311 [sy1234@gm il] There's a new version of that which supposedly has a better battery
| | 263322 [AEtzold@gm .] Dear Sy,
| | 263333 [sy1234@gm il] pdaXrom is unfinished and is still alpha, and VERY alpha for
| | 263349 [AEtzold@gm .] Dear Sy,
| | 263617 [sy1234@gm il] C1000 support has only been _very_ recently added.  It was
| | 263619 [sanobast-rub] If you want to stay with sharp rom, the zgcc provdided my meanie
| | 263645 [sy1234@gm il] I won't have time to test Poky until the weekend, but I'll give it a
| | 263646 [greg.kujawa@] Out of curiosity how is it doing all of the script creation and
| | 263721 [sy1234@gm il] So far there are no limitations except that I don't tend to have an
| + 263262 [damnbigman@g] ...
+ 263469 [sanobast-rub] Posted via http://www.ruby-forum.com/.
  263615 [sy1234@gm il] Thank you.

encoding
263255 [ribi@sc wi g] How can I encode a text with the characters &nbsp; or &ouml; in readable
263265 [fxn@ha hr f.] Have a look at http://htmlentities.rubyforge.org/.

Typos in eigenclass - Changes in Ruby 1.9
263263 [ed.odanow@wo] Moin, moin!

Segmentation Fault in httpclient 2.1.0
263268 [lists@hu an ] I've written a ruby script that connects to a web service running
263342 [nakahiro@sa ] You need to use the openssl version that matches with the openssl header
264666 [lists@hu an ] That doesn't seem to be the problem. We've found that with OpenSSL

pulling specific dup. elements out of an array
263274 [globyy3000@h] if i have an array full of numbers such as
+ 263275 [dan@fl en ra] array.delete('0')
+ 263295 [wade.christo] why didn't reject work?
  263301 [globyy3000@h] well lemme further explain what im attempting to do and why i couldnt
  + 263509 [shortcutter@] Just a small remark: you do not have numbers in your array but
  + 263512 [apeiros@gm .] Why do you want to remove the 0 elements for that? They won't influence
    263529 [noah.easterl] but rejecting the 0 elements will change the length of the array,
    263531 [apeiros@gm .] It helps to read the whole mail ;-p

Followup question on defining methods dynamically
263277 [kenneth.m.mc] module Test
263291 [dblack@ru yp] module Test
263297 [kenneth.m.mc] Do modules not execute their own code (such as the 'p "Testing"') below
263299 [dblack@ru yp] They do execute their own code, but the code being executed is an
263326 [robert.dober] Hmm I think it might be useful to clarify this a little bit
263377 [kenneth.m.mc] Yep, it's the extend that did it for me.

percentage in Ruby
263278 [chen_li3@ya ] How to write percentage in Ruby, for instance 1.2%? Do I have to change
+ 263281 [_mwryder@wo ] Try printf("%2.2f\%", 1.2)    ==> displays 1.20%
+ 263283 [pubsub@ru yi] Yes, % is the modulo operator, so 1.2 percent would indeed be best
| 263343 [mick@ho li s] class Numeric
+ 263293 [Kevin.Brown@] ...
  263337 [chen_li3@ya ] Thank you all for the inputs.

HighLine and Readline
263280 [ari@ar br wn] Hey,
263294 [gregory.t.br] Here's the relevant source, as you can see it ignores your input stream.
263298 [james@gr yp ] If you know how to point Readline at another IO, we take patches.  ;)

Ruby Metaprogramming
263282 [ari@ar br wn] Are there any suggested resources on learning the art of Ruby
+ 263287 [james@gr yp ] James Edward Gray II
| 263308 [robert.dober] metakoans right? Yes and the work of Ara in general, look at Prototype e.g.
+ 263296 [james.britt@] Ruby for Rails, by David Black.
  263300 [ari@ar br wn] I can buy Ruby for Rails at my local bookstore, but it costs a bunch.
  263302 [bsimmers@cm ] I don't know if this is enough of a difference, but it's only $30 at
  263312 [james.britt@] And I think a PDF versions is also available from the Manning site.
  263313 [_mwryder@wo ] It is, for $22.50, about half the cost of the printed version.

Better way to do this? Currently using two method_missing calls...
263303 [dan.gottlieb] I'm building a wrapper around a web service and I'd like to have my
+ 263306 [fxn@ha hr f.] Wouldn't the standard delegator library suffice? The description in
| 263331 [dan.gottlieb] Thanks for the reply.  I'm probably being dense here, but I don't see
| 263339 [fxn@ha hr f.] I guess the one being dense was me then :-).
| 263344 [dan.gottlieb] Ok, I see where you were going now.  I guess I could go in that
| + 263351 [fxn@ha hr f.] The idea is then that something like
| | 263353 [dan.gottlieb] exactly
| | 263416 [fxn@ha hr f.] Yeah, I would have written the same implementatcion than you to
| | 263639 [dan.gottlieb] Thanks - I appreciate your working this through with me.
| + 263465 [shortcutter@] ...
|   263640 [dan.gottlieb] Thanks for the reply.  I was wondering if that there was a way to do
|   263647 [shortcutter@] Can you explain why you are reluctant to create an instance for this?
|   263658 [dan.gottlieb] Fair point :). Actually, I'm less concerned about performance then
|   263668 [shortcutter@] We're not talking about a "bunch", are we?  The reason I keep stressing
+ 268341 [paolo.nusco.] The flickr library (available via RubyGems) walks around the problem

python-style decorators
263304 [kr@es em ly ] I've been using ruby for about 8 months now and I've come to appreciate
+ 263505 [transfire@gm] This is quite interesting.
| + 263719 [kr@es em ly ] Thanks. I'd like it to be more than interesting; I want it to be
| | + 263888 [kr@es em ly ] ...
| | + 266555 [transfire@gm] That's not a bad idea really. It would make it clear when a decorator
| | | + 266604 [kr@es em ly ] Absolutely. I'd be delighted if you decide to include this. I'll post
| | | | 266608 [shevegen@li ] A simple question, what's it used for?
| | | | 266612 [transfire@gm] T.
| | | + 266763 [dan-ml@da 42] class C
| | |   266765 [kr@es em ly ] I like that. I think the gain in robustness more than offsets the
| | |   266769 [transfire@gm] Just a thought...
| | |   266844 [kr@es em ly ] That notation looks really nice. It's much better than my original
| | |   266845 [transfire@gm] Cool. It will be interesting to see how it turns out.
| | |   266873 [kr@es em ly ] 1. If you write "def foo.bar() end", bar is guaranteed to be a
| | |   + 266910 [robert.dober] Hmm that is why I put my defs into modules, even one module per
| | |   + 266949 [transfire@gm] So you've hit the same wall I did with module inheritance. That's
| | |   | + 266960 [robert.dober] Hopefully I am not too egocentric about my own approach, but if so you
| | |   | | 266962 [transfire@gm] In my case, I wanted to use the notation in stay of ClassMethods
| | |   | | 266985 [robert.dober] Still trying to get the problem
| | |   | | 266997 [transfire@gm] When you want class-level methods that go along with your instance
| | |   | | 267064 [robert.dober] Ok I think I got it, thx, I was indeed trying to make Keith's
| | |   | + 266983 [kr@es em ly ] That sounds good to me. It would easily solve this problem and make
| | |   |   266996 [transfire@gm] Fudge Nuts! Well, I knew something was a miss. I know Ruby too well to
| | |   + 267527 [pbrannan@at ] irb(main):001:0> class Foo; def foo; puts "HERE"; end; end
| | |     267626 [kr@es em ly ] That's just what I was looking for. I don't understand why this isn't
| | |     + 267662 [nobu@ru y- a] Because it's too dangerous rather than unsafe.
| | |     | 267670 [nobu@ru y- a] ...and you have to know too deep implementation details very
| | |     + 268146 [pbrannan@at ] Array class?
| | |       268176 [kr@es em ly ] There are various reasonable ways to handle errors such as this.
| | + 267763 [rick.denatal] Hmmmm, I'm just catching up after being too busy for a few weeks to
| + 263908 [phrogz@ma .c] Very much for reasons like this do I keepcauggesting that def be a
+ 267541 [charles.nutt] Depending on how you've implemented it, the declarative style is not
  267621 [kr@es em ly ] You're right; it is not. But that doesn't bother me too much.
  269249 [gomatteo@gm ] what about http://blog.ntecs.de/articles/2004/08/16/implementing-python-decorators-in-ruby
  269507 [kr@es em ly ] Interesting. As long as we're willing to modify the ruby interpreter,

changing indentation for case in Emacs (ruby.el)
263310 [oudeis@no om] Using Emacs to edit ruby files, I'd like to have case expresssions indented

Object.private_instance_methods  <--- Kernel.singleton_methods
263314 [rpbraswell@h] How do the Kernel.singleton_methods get to be
+ 263332 [robert.dober] Are they? I do not think so, maybe you could rephrase your question, I
| 263404 [rpbraswell@h] The question was not a good one.  I now understand that the Kernel singleton
| 263405 [robert.dober] ah you meant the results, of course, I am the worst guesser of the world :)
+ 263334 [dblack@ru yp] Following the trail in eval.c and class.c, it looks like they're bound

Changing Gmail settings
263316 [riggasconi@g] ...

How does Hpricot ... inner_text work?
263317 [phlip2005@gm] require 'hpricot'
263355 [phlip2005@gm] When in doubt, blame Debian's clumsy Ruby packaging. The out-of-the box

Excel or CVS parse
263327 [testmyeclips] How to parse excel files or CVS files easy?
+ 263357 [renard3411@g] Assuming you have Windows then I would suggest that you use win32ole
+ 263422 [ari@ar br wn] FasterCSV. check rubygems
  263519 [testmyeclips] Thank  You

DateTime irrationality
263335 [lcl@ta az d.] I am starting to recode several home applications in Ruby/GTK2 after
+ 263341 [cliffrowley@] Just a matter of curiosity as an avid astronomer, what are you working
| + 263356 [lcl@ta az d.] Will reply directly Cliff as it is a bit off-topic.
| + 263426 [lcl@ta az d.] Sorry Cliff - my message to your gmail account bounced.  This happens a
+ 263383 [george.budd@] That's weird.
  263425 [lcl@ta az d.] That's weird.

Help: Matching last character of a string!
263336 [uwe.lammers@] I am trying to replace the last character of a string with
263354 [hermann.mart] No idea what/why, but at least I can tell you

building rubygems without documentation
263347 [sy1234@gm il] I see no way to build rubygems without documentation.  I checked the
263359 [ben@bl yt in] Try gem help install.  In there, you'll see --no-rdoc and --no-ri.
+ 263361 [transfire@gm] Why are rdoc installed by default anyway? I have never used the rdocs
| 263362 [ben@bl yt in] I use them all the time... there are a buncha libraries that don't post
+ 263363 [sy1234@gm il] No, I mean "RubyGems" _itself_
  + 263365 [ben@bl yt in] Ah.  Sorry about that, when you said "ri and rdoc for gems", I assumed
  | 263367 [dejan.dimic@] If I understand the initial question right you do not want to install
  | 263373 [sy1234@gm il] You half-understand.  I don't want to install the documentation for
  | 263417 [dejan.dimic@] In that case you can put comment on line that installs documentation
  | 263420 [sy1234@gm il] Thank you.  This sounds promising.  =)
  + 263418 [drbrain@se m] func=detail&aid=8450&group_id=126&atid=575
    263421 [sy1234@gm il] =)
    263423 [znmeb@ce ma ] You're right ... and it shouldn't take a minute on a 2.2 GHz Athlon64 X2

Ruby on the iPhone
263374 [florgro@gm i] just a quick note to let everyone know that it is now possible to run
263378 [ben@bl yt in] I wonder if it's possible to install RubyCocoa?  If so, UIKit might be

[ANN] RWEB 0.1.0
263379 [ttmrichter@g] RWEB is a literate programming tool for Ruby patterned after Donald
263380 [znmeb@ce ma ] 1. Are you using "Web" itself, "noweb", something else, neither, etc.?
263387 [ttmrichter@g] RWEB is an all-Ruby package.

Ruby: Looking for advice regarding Linux, wireless networking  will pay for time  20070804
263382 [gsc@om ga og] ...
263496 [tendingcows@] Try http://forums.maraki.net or www.cypress.com
263793 [gsc@om ga og] good point about the WEP    thanks

sgub stretching over several lines
263384 [janaskhoej@g] string = string.gsub(/&lt;h3
263392 [shaiguitar@g] .*
263394 [alexg@ku cr ] .* won't match over multiple lines without the m modifier on the
263395 [sepp2k@go gl] That can't be the OP's problem since the OP doesn't actually use .* in his
263444 [janaskhoej@g] Alex & Sebastian,
263450 [alexg@ku cr ] Without knowing the whole problem it is difficult to say what the
263451 [janaskhoej@g] Thanks, I will have a try.

reloading a web page
263385 [ja_bowen@ya ] I am trying to load up some stock charts for a quick
263398 [angus@qu va ] [Jeffrey Bowen <ja_bowen@yahoo.com>, 2007-08-05 06.23 CEST]

[ANN] SuperCaller 1.0.0 Released
263386 [drbrain@se m] SuperCaller version 1.0.0 has been released!
263388 [dan-ml@da 42] That is really awesome.
263389 [drbrain@se m] Impossible, rb_f_binding() is static.  (Well, you could reimplement

How can I get HTML's varibles in embeded ruby?
263391 [wzfg@si gt l] myInput, DataFile,TagFile in the following segment HTML codes.
+ 263393 [shaiguitar@g] <form name="myInput" action="deTap3-1.rhtml" method="POST">
| 263407 [dangerwillro] OP didn't say Rails. Could very well be serving some kind of eruby.
+ 263409 [bsimmers@cm ] require 'cgi'
| 263436 [wzfg@si gt l] Thanks a lot.
+ 263493 [lloyd@2l ve ] Isn't hpricot (http://redhanded.hobix.com/inspect/hpricot01.html) an
threads.html
top