372183-374334

371955-372840 subjects 372377-373193

^ rb-readline 0.2.2 released
372183 [luislavena g] I'm pleased to announce the release of Pure-Ruby Readline library version 0=

^ Mocks are sticking around between tests
372184 [alexander.ba] I'm using RR as the mocking framework for a personal project of mine.

^ ruby and java
372188 [nedumeritulc] I have a .jar file and want to use some methods form this jar file in
+ 372189 [josh.cheek g] Why don't you want to use JRuby? It's really straightforward, you can
| 372191 [nedumeritulc] I don't want to use Jruby because my ruby code will be use by a tool
| 372214 [b.candler po] Then you'll have to start up an external jvm process (e.g. using
+ 372209 [artonx yahoo] I believe RJB (Ruby Java Bridge) is for you.
+ 372251 [namekuseijin] Mu.

^ Removing files if those exists
372190 [simo.maatta ] I just started to work with ruby and I do not know how to do this.
+ 372192 [josh.cheek g] First select them using Dir[] (you can try to get fancy with a pattern here,
| 372196 [shortcutter ] re,
| 372212 [unbewusst.se] ______________^___________________
| + 372216 [shortcutter ] Which star do you mean, the first one or the second one?  I can't
| + 372434 [shortcutter ] Somehow my reply did not make it to the news group.
|   + 372435 [ammarabuali ] Here's some coverage on splat: http://ruby.runpaint.org/variables#splat
|   + 372442 [unbewusst.se] fine, thanks !
+ 372211 [unbewusst.se] #! /opt/local/bin/ruby1.9

^ rdoc doesn't recognize block comments anymore
372195 [stefano.croc] I just found out a strange issue with rdoc and I'm not sure whether there's
372201 [ryand-ruby z] Yes.

^ How to turn off auto commit in rake 0.8.7
372198 [sawrows gmai] How to turn auto commit off while doing rake version:write and rake
372207 [b.candler po] rake doesn't know anything about databases AFAIK. So I guess you're
372328 [jarmo.p gmai] For me it seems that the author means `git commit` when using `rake

^ Concurrent Ruby webservices from wsdl2ruby
372200 [pazuzule yah] as a ruby-newbie I'm currently stuck with a problem (possibly more
+ 372202 [shortcutter ] Yes, I think the issue might be with the proxies.
+ 372206 [pazuzule yah] thanks for your answer!
| 372210 [shortcutter ] Yes, might be.  IIRC you can set up a simplistic WS with WEBrick.
+ 372354 [headius head] It's possible you tried a version of JRuby that had some issues with
  372521 [pazuzule yah] I'm having some success, currently with Ruby 1.8.6 and wsdl2ruby

^ subscribing to ruby-core
372203 [devguy.ca gm] but i am not getting any notification emails?
372204 [fxn hashref.] That happened to me before. It turned out they were in the spam folder.
372205 [devguy.ca gm] thanks, i searched my spam folder, i'll search again.

^ delete the browser cache of IE through ruby
372208 [arihan_sinha] Dear All,

^ how do i use JS.Class in ruby
372213 [amittomer25 ] I would like to use JS.Class in ruby but i don't know where to
372217 [jcoglan goog] Are you referring to http://jsclass.jcoglan.com? That's not a Ruby project,
372220 [amittomer25 ] James Actully what problem am facing in my application i am generating a

^ Messagebox on client side
372221 [amittomer25 ] I used win32 api messagebox in ruby to generate a messagebox
372225 [jeremy bopp.] No, it is not possible.  Your Ruby code is running on your server and
372228 [amittomer25 ] Thanks jermy for your response ,this is something i want to achive .In
372230 [jeremy bopp.] No, you cannot send the desktop, and you wouldn't want to either.  I'll
372233 [amittomer25 ] Thanks Jermy

^ basic Shoes app
372222 [jean-christo] Hey there everyone !
+ 372224 [steve stevek] It's not exactly what you want, but it's close enough to get you going.
+ 372229 [ashbbb gmail] Interesting! How about this one? ;-)

^ about handling args in block
372232 [jarodzz gmai] I'm writing a Node class for a Binary Tree.
372237 [jeremy bopp.] In your example, node is just a reference to the same objects referenced
372246 [shortcutter ] OP, you can somewhat simplify the code
372288 [w_a_x_man ya] Will that work? Or would it have to be
372298 [shortcutter ] left.nil? && right.nil?
372309 [jarodzz gmai] Thanks Jeremy, wax, and robert.
+ 372310 [jgabrielygal] In that case it's probable that you have another level of indirection,
+ 372312 [shortcutter ] Please do not top post.
  372322 [jarodzz gmai] Let's see if I get this.
  + 372323 [shortcutter ] Exactly.
  + 372324 [jgabrielygal] I think you are confused about how variables and objects work in Ruby.

^ Long conditional statements
372234 [courtlandall] Some parts of my code call for really long conditional statements of the
+ 372236 [botpena gmai] ri any?
| + 372252 [namekuseijin] see what a concise and precise answer is, waxhead?
| + 372257 [joelvanderwe] ...
| + 372258 [shortcutter ] Problem is that if a, b, c, d, e and f are expressions you would have to
|   372260 [courtlandall] It happens in a variety of different ways in my code, so the more techniques
|   372270 [shortcutter ] if [:key1, :key2].any? {|k| somehash[k].blank?}
|   + 372273 [w_a_x_man ya] ns?
|   + 372287 [botpena gmai] do_something  if [:key1, :key2].any? {|k| somehash[k].blank?}
+ 372241 [glennj ncf.c] Use case/end
| 372274 [shadowfirebi] def something()
| 372276 [shortcutter ] That's not the same as "something if a || b || c || d"!
| 372278 [shadowfirebi] Arse.  No, of course not.  Sorry, long day.
| 372282 [w_a_x_man ya] +1
+ 372249 [w_a_x_man ya] x =3D 4 ; y =3D 9 ; z =3D -2
+ 372266 [b.candler po] You can split them after the operator and continue them on the next

^ [Q] best practice for redefining methods at runtime?
372239 [cremes.devli] I have a class that I would like to "freeze" when it reaches a particular state so that it becomes read-only. I do *not* want to use the existing #freeze method because it raises an exception when there is an attempted mutation on a frozen object and I want the attempt to be silent. It appears that the best way to enforce this (state machine pattern) is by redefining the accessors and other methods that cause mutations to be no ops.
+ 372259 [wishdev gmai] Morning Chuck.
| + 372318 [cremes.devli] Thanks for everyone for their suggestions. Instead of using metaprogramming, which in this case is apparently quite problematic, I'll go with the easiest solution of doing an "unless" check in certain key methods. Obviously that won't prevent a future developer from adding singleton methods to the object(s) or messing with them in some other way, but that will clearly break the contract. The docs will say "don't do this" and leave it at that.
| + 372321 [shortcutter ] ars
+ 372263 [robert.dober] Reasonable maybe but it is far from achieving what freeze does,

^ Setting Class Variables with Class Method
372240 [moger777 hot] Hey guys,
372242 [jgabrielygal] You can't call a method before defining it. The call to self.goodbye

^ Setting Windows ruby environment paths?
372244 [adammil2000 ] I installed Ruby using rubyinstaller.org but afterwards Windows cannot
+ 372255 [devguy.ca gm] this might help
+ 372281 [pmcgrath gma] As far as i can remember it does update the windows path. If you
+ 372286 [luislavena g] RubyInstaller by default will not associate the .rb scripts or add

^ Re: best practice for redefining methods at runtime?
372250 [namekuseijin] the only best practice I would advise is to *not* redefine methods at

^ [Mac OS X] from where is coming __CF_USER_TEXT_ENCODING ?
372253 [unbewusst.se] __CF_USER_TEXT_ENCODING => 0x1F5:0:1
372261 [ryand-ruby z] please don't sue ruby :P
372292 [unbewusst.se] yes ok right, __CF_USER_TEXT_ENCODING is coming from CFUserTextEncoding.

^ execute the ruby script remotely
372256 [arihan_sinha] I am trying to do something like
+ 372267 [b.candler po] Look into ssh.
+ 372268 [devguy.ca gm] remote login with ssh comes to mind =)

^ Distributing a gem
372262 [ggarra13 gma] I`m trying to distribute a gem but gem push is not available under
372271 [jeremy bopp.] I'm running Ubuntu 10.10, and my gem command does have push.  The
372401 [ggarra13 gma] I have 10.04 and gem from apt-get.
372403 [jeremy bopp.] What do you get when you run gem --version?  Ultimately, you may need to

^ Distributing a binary
372264 [ggarra13 gma] I have been trying to create a binary exe file from some ruby files
372269 [sutniuq gmx.] Use OCRA: http://rubygems.org/gems/ocra

^ Re: from where is coming __CF_USER_TEXT_ENCODING ?
372265 [b.candler po] If you want the long answer to that question, see
372290 [unbewusst.se] ok, fine thanks !

^ <no subject>
372277 [bmmorris sta] unsubscribe

^ Could you expand?
372279 [rubfor recit] What is your server and what is your client? You talk about win32api -
372293 [amittomer25 ] Mike this is something i want to achieve

^ First Law of Classes
372283 [rubfor recit] I was introduced to Ruby by a charming German girl called Ulrika. She
+ 372284 [joelvanderwe] 1. instance as unique token
+ 372306 [b.candler po] Technically, if it's just procedures with no mixins, there's no

^ unsubscribe
372285 [aaron.broad ] unsubscribe=EF=BB=BF

^ generating random argument lists
372289 [rmiddlehouse] I have a method that takes a variable length argument list of arrays
+ 372294 [nobuoka r-de] One way is to use the built-in function *rand*.
| 372299 [shortcutter ] arrays =3D Array.new rand 10 do
| 372303 [b.candler po] arrays = (1..rand(10)).map { (1..rand(5).map { rand(4)) } }
| 372308 [shortcutter ] It seems there is a bracket misalignment. :-)
| 372325 [b.candler po] Sorry, I corrected it in irb but forgot to paste it back into the
| 372358 [shortcutter ] No, (0...rand(5)).map... will create arrays with 0 to 4 elements.  I
+ 372316 [rmiddlehouse] thanks, the elegance of these is pleasing. question remains: how to i
  372319 [josh.cheek g] prefix the argument with a splat
  372471 [rmiddlehouse] ah I see.. the splat either breaks an array into a list or pulls the

^ scope when reopening method
372295 [sentinel1879] Here is a dummy class with a method "meth".
+ 372300 [jgabrielygal] If I understand correctly, you want the meth method defined for object
+ 372301 [b.candler po] By "My application scope", you mean the top-level scope? For example,
| 372304 [sentinel1879] Thanks. I understand that one way is to pass a reference to an object to
| 372307 [b.candler po] Yes, so my suggested solution would be to pass arr at the time the
| 372430 [jrmair gmail] arr = []
| 372446 [b.candler po] Not in 1.8.7 though.
+ 372302 [sentinel1879] Yes, you have misunderstood. "meth" already has access to its own
  372305 [jgabrielygal] OK. Clear.

^ CLICK BELLO LINK FOR NEW HOT COUPLE WAITING FOR U....
372296 [iamforufrien] CLICK BELLO LINK FOR NEW HOT COUPLE WAITING FOR U....

^ sciTE-Go option greyed out
372311 [tararakeane ] I'm using sciTE editor, I've selected Ruby as the language and I've
372315 [sutniuq gmx.] You can always start your Ruby script from the commandline via "ruby

^ web page encoding
372313 [tcblues gmai] How could I know the encoding of a web page using watir and firewatir?
+ 372317 [tcblues gmai] is there any way to get the correct characters from the website using =
+ 372526 [tcblues gmai] Of oourse I have the same problem with everything... trying to reach

^ [COT] Wired on sources of creativity
372314 [shortcutter ] for those of our community who have a holistic interest in our
372320 [devguy.ca gm] i do notice each time I remind myself about how much my dead-end job

^ Erb location of exception in template
372329 [leslieviljoe] Does anyone know how I can find the location in an Erb template file
+ 372333 [leslieviljoe] Ah, never mind, the 285 is the line number in the template!
+ 372334 [b.candler po] $ erb
  372364 [leslieviljoe] Thanks Brian!

^ get blinking cursor in Console, but not in SciTE
372332 [RichardDummy] I'm running Ruby 1.5.6 over WinXP-Pro/SP3.
+ 372335 [RichardDummy] On Oct 21, 2:11=A0pm, RichardOnRails
| 372338 [sutniuq gmx.] You should REALLY upgrade your Ruby! 1.5 is EXTREMELY out of date!
| 372423 [RichardDummy] Thanks.  That was another mistake in my post.  I really running 1.8.6.
+ 372339 [josh.cheek g] Looks like your Ruby version is about ten years old.
  372424 [RichardDummy] Thanks.  Actually,  reporting that was another of my errors.  I meant
  372425 [RichardDummy] Actually,  there is one very minor issue left.  I'd like to be able to

^ minitest/spec pull request
372337 [brian.takita] mini spec show the exact string of the describe block, rather than the
372400 [brian.takita] Oops, I messed up the pull request. Here is the correct one.

^ How to pass/return a string to calling program?
372340 [tonydema gma] Greetings,
372341 [jeremy bopp.] These should definitely work.
372344 [tonydema gma] Jeremy
372350 [jeremy bopp.] Are you certain that your Ruby scripts are even running?  What is the
372373 [tonydema gma] My script is running; I run it from the command line as I develop it. I
372374 [jeremy bopp.] ur
372389 [tonydema gma] Of course, your right.  The script is running, I have it logging to
372411 [jeremy bopp.] Perhaps you could send a code snippet showing how your daemon runs your

^ Help needed with this code please
372342 [prpaulroche ] I have my terms correct there. Anyway here is one of the classes......
+ 372351 [code apotheo] Maybe I'm missing something obvious, but I think the parts I didn't snip
+ 372386 [prpaulroche ] Thanks for the reply. I think the problem lies in the library class. In
+ 372422 [prpaulroche ] Understood. Thanks again

^ Spreadsheet gem errors
372343 [dsisnero gma] I am using the spreadsheet gem to try to create workbook by copying the

^ Ruby functions list
372345 [badman9694 i] Can anyone please suggest a webpage, e-book or a software where i could
+ 372346 [wishdev gmai] ...
+ 372347 [reid.thompso] ...
+ 372369 [badman9694 i] Thank you.
+ 372375 [devguy.ca gm] What wrong with using ri ?

^ ANN map-1.4.0
372348 [ara.t.howard] NAME

^ Re: Automatic ClassLoader (to eliminate 'require')
372349 [axyd80 gmail] Wow, nice to see that I'm not alone :)

^ Ruby compile failing at make ("LIBRUBY_EXTS: command not found")
372352 [jgold.bg gma] Anyone have any ideas why ruby compile (1.9.1-p430) is failing for me near what
372360 [b.candler po] Probably not unless you say something about the environment you're
372390 [jgold.bg gma] Reasonable point. It's an Amazon Linux image which is by all accounts really
372391 [jgold.bg gma] $ make -v
372420 [jgold.bg gma] Brian and others -- I made some progress and think the problem is in
372574 [jgold.bg gma] It does indeed look like mkmain.sh is generated by ext/extmk.rb (I found that

^ "blade" is broken
372356 [sinara.h gma] The ML archive service "blade" (http://blade.nagaokaut.ac.jp/ruby/)
374324 [sinara.h gma] "blade" is restored now.
374334 [shortcutter ] No, thank *you*.  Btw, is there something wrong with my browser or are

^ EventMachine::Defer + Weird issue
372359 [meetme2meat ] I been Using EventMachine for quite a while a know and I really found it

^ Why is top-level an object rather than just Object?
372361 [jrmair gmail] Why is it that top-level isn't just the Object class itself? what's the
+ 372371 [robert.dober] Well the Object object, happening to be a module too (read class if
| 372372 [jrmair gmail] * calling 'include' in main actually includes in Object
| + 372388 [rick.denatal] I think there's some confusion here between self and the current
| | 372393 [jrmair gmail] There is no confusion. I am aware that the 'default definee' (current
| + 372392 [robert.dober] true, but I do not think it is a good idea
|   372395 [jrmair gmail] Err, how exactly is it a disaster? can you explain? I can see no harm
|   372407 [robert.dober] I believe that Tom (Intransition) has explained quite well. It is also
+ 372396 [transfire gm] It should not be. In fact, I think it is a mistake for main to
  372397 [jrmair gmail] I can kinda buy that argument, though i can see some problems with it
  372402 [transfire gm] Constant lookup would have to be adjusted to go through Object and
  372404 [transfire gm] the
  372429 [jrmair gmail] Dude, instance variables are not inherited in this way. Every object
  372464 [transfire gm] You're right. I extrapolated from the instance case and made a

^ Windows, ODBC and charsets
372362 [cosimo.gugli] I've found very few on the net in regards of Windows and the option
+ 372628 [cbciv yahoo.] This is really a problem with the ODBC driver for SQL Server.  You'd
+ 372640 [KDiddy1 web.] On 22 Okt., 11:53, Cosimo Guglielmucci <cosimo.guglielmu...@gmail.com>
+ 372651 [cosimo.gugli] Thank you KlausG,
  372675 [cosimo.gugli] Ok,

^ Strange consumption CPU for a quite small program
372366 [guillaume.do] Below my little program for Linux (because I use ps command)
372367 [shortcutter ] I see

^ Invoice template / source
372368 [peter.pincus] is there any invoice "template" or source code available ? Something
372370 [peter.pincus] Checking out examples/general/templates.rb (via Prawn list)

^ Ruby Compile.
372376 [tridib04 gma] I am running Ruby 1.8.1 on CentOS release 4.8(Final)..
+ 372378 [jeremy bopp.] In the top level of your Ruby source directory should be the compiled
| 372380 [tridib04 gma] I am running it on a server of my School....So i didn't get it how to
| 372385 [jeremy bopp.] The options I listed are about as basic as it gets, I'm afraid.  My
+ 372398 [devguy.ca gm] try building the ruby source this way so it builds and installs under
  372399 [devguy.ca gm] correction to the path,
  372546 [tridib04 gma] @Rajinder Yadav
  372549 [ammarabuali ] Yes. You didn't install ruby, you just compiled it. The system can't
  + 372550 [tridib04 gma] Thank You It is working now.....It shows config.status: creating
  + 372551 [jude.dashiel] Rmlyc3QgaWYgeW91IGJ1aWx0IGluIC91c3IvbG9jYWwvc3JjLCAvdXNyL2xvY2FsL3NyYy9ydWJ5
    372553 [tridib04 gma] Thank You very much...I got the result I was expecting....
threads.html
top