242352-244124

242196-243432 subjects 242654-244527

Can't Marshal.dump a Java object (from using Rjb)
242352 [weyus@at .n ] All,
242392 [mental@ry ia] No, not at this time.  It isn't even technically feasible to implement unless the Java object being wrapped belongs to a class which supports Java serialization (i.e. implements java.io.Serializable).

NetBeans Ruby Support
242353 [bruparel@me ] Has anyone successfully installed Ruby/Ruby on Rails plug-in modules in
242354 [Reid.Thompso] which version of NetBeans are you using?  I think the ruby support is
242356 [bruparel@me ] Sorry.  It is NetBeans 6.0 M7 release.
+ 242374 [Reid.Thompso] Ok -- running the linux version seems to be working fine for me..
+ 242375 [bruparel@me ] I think that I am actually going in reverse here!!
  242425 [bruparel@me ] Problem solved.  On my other laptop which is not connected to corporate

DRb freezes YARV?
242400 [meinrad.rech] dear all,

Adding descriptive text to OptionParser output
242401 [tomp@ea th i] I'd like to add a paragraph of text to my usage message, describing
242416 [prhlava@ea t] example of working class below.
242417 [tomp@ea th i] Thanks, Vlad.  That's better than what I had been doing.

Re: Really cool looking Ruby job
242411 [phurley@gm i] So what (future?) product does CodeGear have that ties into wanting a

Using Java POI in ruby?
242423 [captainr@ma ] Does anyone have any idea how to use the Ruby bindings for the Java POI

Looking for crc32-0.1.0
242428 [www-data@se ] I inherited some legacy ruby code that uses the Digest::CRC32 extension
+ 242469 [gavin@re in ] Could you post a few simple and complex test cases of the input/output
+ 242514 [interfecus@g] CRC32 can be found in the OpenSSL library. This is available with all
  242525 [s0nspark@gm ] Yes, I am aware of that (and that Zlib also has a Ccrc32 method I could

Encrypted By Ezcrypto but cannot decrypt with PHP mcrypt
242433 [kwon37xi@gm ] Our site is developed with Ruby On Rails mainly, but some parts use PHP
242489 [kwon37xi@gm ] I solved the problem with aes-128-ecb in EzCrypto, and

MouseHole 1.9.92/2.0B - Web Interface Problems
242434 [qYuri-us@no ] I installed MouseHole v1.9.92 gem and all its dependencies. I'm having no

Convert country name to country code
242436 [petr@pu ch o] Ive got the TZInfo library installed, and I am able to convert a country
242492 [rretzbach@go] I just took a small glimpse on the API doc and think it's not possible
242493 [rretzbach@go] Sry, too fast too furious!

QT Ruby  odd focus behavior
242438 [tasmack@gm i] I was writing a simple 'file sharing' program with QT and ruby.  I
242511 [interfecus@g] Do you have explicit callbacks into Ruby to allow Ruby's green threads
242823 [tasmack@gm i] Thanks for the suggestion, and sorry it took so long to try it out.
242961 [jwells@se va] This might not be particularly useful, but have you considered
243035 [tasmack@gm i] I've thought about that.  I hadn't done anything with ruby and threads
243036 [richard.j.da] Qt and QtRuby have complete support for networking integrated into the
243721 [tasmack@gm i] Thanks for the ideas!

ruby / php operator differences.
242439 [beingthexemp] I am trying to do some parsing of binary data.
242470 [B.Candler@po] Errm, how about providing some evidence for that claim?
+ 242473 [matz@ru y- a] Maybe he assumed integers to be wrapped around 32bits?
+ 242474 [beingthexemp] i wasn't 'claiming' anything. I was asking about why that was happening.
  242482 [matz@ru y- a] Why that was happening?  Could you tell me what you have figured out?
  242567 [beingthexemp] Hey Matz
  242644 [beingthexemp] $int |= 0x10000000
  242693 [B.Candler@po] int |= 0x10000000
  242821 [beingthexemp] pretty flippin cool.
  242874 [B.Candler@po] You don't need to make use of the return value. Every expression in Ruby
  242883 [beingthexemp] Ah, yes that makes sense. Thanks.

Sorting objects...
242446 [jasbur@gm il] I have a series of objects in an array. Each object corresponds to an
242447 [farrel.lifso] applications.sort_by{|object| object.ranking}
242465 [collinsj@se ] Another way would be to add a <=> method
242472 [farrel.lifso] require 'benchmark'
242488 [rretzbach@go] I don't understand, can someone please explain this loss of speed?
+ 242498 [collinsj@se ] I'm guessing it has to do with Enumerable#sort_by doing the key caching
+ 242516 [interfecus@g] Sorting compares pairs of objects many more times than the number of

[ANN] Speaker Selection for Gotham Ruby Conference
242448 [gregory.t.br] The organizers of GoRuCo, the Gotham Ruby Conference, are proud to

post_form
242475 [coosa76@gm i] Dear all,
242478 [coosa76@gm i] What didn't work is that it's not displaying the results based on the
242627 [coosa76@gm i] It's not displaying the results; there is a button in the page and when
+ 242628 [halostatue@g] You probably want to ask this on the Rails forum. This is the general
| + 242630 [halostatue@g] I was wrong. This is the right place; I just don't know the answer and
| + 242631 [coosa76@gm i] I'm not using Rails at all,
+ 242629 [coosa76@gm i] <INPUT name="txtIC" maxlength="12"><Input type=hidden name="txtSub">
  242694 [pit@ca it in] The page says "ELECTION COMISSION OF MALAYSIA, ELECTORS ROLL CHECKING".
  242789 [coosa76@gm i] URI.parse('http://daftarj.spr.gov.my/daftarbi.asp'),{"txtIC" =>

extension in c, close file when script ends, rb_io_fptr_finalize
242487 [Fleck@sc le ] initialize method opens the file and it then is permanently open. I don' t
242499 [B.Candler@po] I'd recommend you copy the way that Ruby's File class does it.

Re: Mocha raise exception first call, return value second ca
242491 [nappin713@ya] Thanks for the help both of you!  I ended up using the method James

Re: [Rails] Re: High ActiveRecord CPU Utilization
242503 [jeremy@bi sw] There is no difference between the two in this case, so the script
+ 242560 [rsanheim@gm ] Jeremy
| 242569 [jeremy@bi sw] Sure; I think so. But I don't want to compile or maintain the suite ;-)
+ 242568 [jeremy@bi sw] No, sorry: it doesn't load a Rails environment at all, just vanilla
+ 242590 [lojicdotcomN] Mohit, do you mind if I ask how you're posting messages to
  242594 [james@gr yp ] I believe that was a cross-posted reply by Jeremy.  I never saw the
  242598 [lojicdotcomN] Interesting. I guess I mistakenly assumed a one-to-one correspondence
  + 242599 [james@gr yp ] I don't believe ruby-forum is involved here.  I think Jeremy cross-
  | 242619 [lojicdotcomN] Well if you go to: http://www.ruby-forum.com/topic/100325
  | 242621 [james@gr yp ] Ah yes, I see it now.  This is some quirk of ruby-forum I'm not
  + 242657 [jeremy@bi sw] Ha! Sorry. I just hit "Reply All" to Mohit's message. Blame GMail ;-)

how to aliase a module method?
242505 [fxn@ha hr f.] I am trying to aliase a module method to some local alias (to ease
+ 242650 [dseiler@et e] It's possible, sort of.  Try
| + 242651 [ara.t.howard] module M
| + 242675 [fxn@ha hr f.] I don't understand that technique (it is not working here). In fact
|   242746 [rick.denatal] Because alias requires that both arguments be names (or symbols), Note
+ 242653 [jan.svitok@g] first of all, you need to use symbols for methods (actually, you just
  242670 [fxn@ha hr f.] No, that's not true.

Retrieving email message body only via 'net/pop'
242506 [dazzle@ed zz] Is it possible to retrieive just the email message body using 'net/
242535 [B.Candler@po] The POP3 protocol (RFC 1939) has a command to retrieve the headers without

WeBrick
242508 [hanan_mneimn] what could I use to start and shutdown webrick from within a ruby script an
242510 [alex@bl ck e] Alex

open4
242509 [hanan_mneimn] uninitialized constant fcntl::F_SETFD. why???  please note that I am working
242558 [tim.pease@gm] open4 will not work on Windows -- it is a Unix only library.For
+ 242562 [ara.t.howard] right, and the problem remains.  try
+ 242774 [hanan_mneimn] Thanks for all who replied

Dealing with multiple encodings in the same app
242512 [isak.hansen@] Our (rails) app is mainly utf-8, so we set kcode to u.
242529 [manfred@gm i] to set it anymore.
242557 [isak.hansen@] That's the gist of it, at least when running ruby with kcode = 'u'.

How To Find The Name Of A Variable
242518 [boss@ai bl d] I'm wondering how I can ask a variable what its name is, so that I
242521 [gregory.t.br] You can't.  Variables aren't objects in Ruby.  However, if you post a
242524 [boss@ai bl d] I have a line item object in memory (@line_item) and a set of line
242526 [pit@ca it in] Andy, you could try to change the way you create your line item objects.
+ 242530 [jens.wille@u] line_item = instance_variable_get(:"@#{symbol}")
| + 242532 [boss@ai bl d] Aha!  I like that too!
| + 242540 [boss@ai bl d] This works perfectly for me (omitting the colon) with minimal change
|   + 242542 [jens.wille@u] great!
|   + 242547 [james@gr yp ] I'm telling you it works!  (I have no idea why...)
|     + 242551 [twinwing@gm ] ...
|     + 242710 [boss@ai bl d] James,
|       242711 [robert.dober] James it seems that you should change name, maybe John Doe?
|       + 242713 [james@gr yp ] Don't worry, my own family sometimes misspells my name.  ;)
|       + 242743 [boss@ai bl d] Touch?!  Being spelled 'Stuart' does vex me :)  Happily my family
+ 242531 [boss@ai bl d] Pit, that's a neat approach.  I'll try it.

WEBrick Error on NT - Errno::EBADF: Bad file descriptor
242519 [benjohn@fy h] I'm trying to start up webrick on my NT box.

A couple of questions from a Ruby neophyte
242527 [planetthough] I'm thinking about learning a new scripting language, and I have a
+ 242534 [alex@bl ck e] Before I start:  I've done most of what you need to do successfully with
| + 242537 [sonoflilit@g] I think you stumbled on the right language.
| | 242771 [sonoflilit@g] I mean http://rubymentor.rubyforge.org/
| + 242582 [perrin@ap th] The only quibble I have with your post is the above characterization of
|   242810 [dolgun@ex it] It seems like regular expressions are slightly different from language
|   + 242838 [perrin@ap th] If you've ever noticed the way OOP characteristics look bolted-on in
|   | + 242858 [raims@do .c ] That's maybe a deficiency in language design but I don't think the
|   | | 242913 [perrin@ap th] It may not be worse internally, but it's more annoying to use -- and
|   | + 242905 [B.Candler@po] I don't know if all the differences are documented anywhere, but the one
|   | + 242914 [perrin@ap th] For the most part, they're pretty similar.  There are a few differences
|   |   242921 [B.Candler@po] Really?
|   |   242930 [perrin@ap th] Wow.  All this time, I thought the parentheses were necessary.
|   + 242870 [B.Candler@po] I learned through "Programming Ruby", a.k.a. the venerable "Pickaxe" book,
+ 242832 [GGarramuno@a] On 8 mar, 09:08, "planetthoughtful" <planetthought...@gmail.com>
| + 242844 [dangerwillro] all of the languages you're looking at are available for WinXP.
| + 242857 [raims@do .c ] Don't understand the difference here. Anyway the official Python
| | 244121 [gavin@re in ] I don't know Python, so answer me this: With that required __len__
| + 244123 [gavin@re in ] An excellent, informative post. Thanks for sharing!
|   244124 [shortcutter@] Yes.  Basically NFA regexp engines have to do backtracking, DFA's don't.
+ 242940 [cparticle@gm] For what's its worth I think Ruby is the way to go.  It sounds like
  244114 [planetthough] particular, I was looking for a scripting language that had better

having problems fiddling with rake
242545 [rdm@cf l. om] I'm trying to get "rake doc:app" pull its input from a different
242589 [jim@we ri hh] Puts doesn't return a useful value for +map+ to use.
242592 [rdm@cf l. om] Point taken, but it didn't work even without the puts.  So,
+ 242595 [rdm@cf l. om] Actually, I just tried reworking the script to resolve
+ 242596 [jim@we ri hh] The original task uses a rake standard RDocTask.  Of the six lines that
  242604 [rdm@cf l. om] The onerous part is keeping track of the library, in
  242623 [rdm@cf l. om] namespace :doc do

Array#sort -block with conditions for <=>'ing
242548 [carp@ha ks c] I want to sort an array of objects of the same class (MyClass). The
+ 242549 [farrel.lifso] class MyClass
| 242662 [gavin@re in ] I find your style of mixing imperative and functional return
+ 242555 [B.Candler@po] my_array.sort { |x,y|
  242570 [carp@ha ks c] Thank you Brian, the solution you offered solved my problems!

[SUMMARY] GOPS (#116)
242553 [james@gr yp ] When I was first solving this quiz I built a suite of functions that measured

TkVariables and ".value" method
242559 [alex.decaria] The code below, which puts "Hello" in a label on press of a button,
242561 [B.Candler@po] Scroll down to "Writable Attributes"

(none)
242564 [dvohra09@ya ] ...

unsubscribe
242565 [dvohra09@ya ] ...

[FIXED] WEBrick Error on NT - Errno::EBADF: Bad file descriptor
242571 [benjohn@fy h] Oddly, none of this happens when I run directly from irb (I've not tried

Net::HTTP.post_form issue
242586 [coosa76@gm i] Dear all,
242617 [coosa76@gm i] [snippet]

Problems with alias_method
242593 [pratiknaik@g] I'm trying to alias_method in a bit different way. Here's what I'm
242641 [jan.svitok@g] if I understand correctly,  the problem you want to solve is to move

HTTP problems on Windows?
242600 [pbailey@bn .] I'm working with a colleague over in Unixland in our company. I'm down
242601 [dangerwillro] Are you kidding?!! Uh, Windows would be the problem. It often is.
242602 [pbailey@bn .] Now, now. No need for religious wars. Personally, I'm planning on
+ 242603 [pbailey@bn .] Never mind. I found the problem, or, my Unix colleague did. Apparently,
+ 242605 [dangerwillro] I was just kidding. Too tempting.

rdoc and and single file output
242606 [djberg96@gm ] Is there a way to generate single file of output for rdoc, creating an
242614 [transfire@gm] try searching for allison template. it gets rid of the frames and
242615 [transfire@gm] Noticed the 2.2 version added filters so that makes it better for
242755 [djberg96@gm ] Thanks for the link.  However, this is a bit too ajaxy for me, and I
242760 [eweaver.spam] Yeah I agree. I haven't gotten around to reworking the CSS yet. The
+ 242782 [transfire@gm] I did a little work on it myself so it would be installable (as a gem
| 242824 [eweaver.spam] It doesn't anymore, it uses an included, compiled version of the
+ 242835 [eweaver.spam] Ruby-Cocoa is *also* working on an Allison fork. But what I had in mind

rails 1.1 to 1.2 upgrade question - is it recommended to upgrade the various rails files (e.g. scripts/*, config/*)
242607 [greg.hauptma] ...
242610 [jameskilton@] ...

Looping through array, deleting elements
242609 [donn@cm cm .] My idea of looping through an array, interrogating elements that are
+ 242611 [rmagick@gm i] What about the Array#delete_if method?
+ 242612 [farrel.lifso] This sounds like it would be a lot easier  with Array#reject or Array#select.
+ 242613 [stefano.croc] I'm not sure I understand your code (what is that ab in the each block?) At
+ 242616 [tim.pease@gm] Not a good idea!  You are modifying the array as you iterate over it
  242626 [donn@cm cm .] There are a couple of dumb things I have done.  First, I had omitted

generate UUID
242625 [beingthexemp] Anyone have a fast way of generating a verson 4 UUID?
242635 [shortcutter@] Make validChars and length constants declared outside the method.  And
242638 [beingthexemp] def rand_hex_2(l)
242664 [eden.li@gm i] He probably meant to_s(16), not to_a(16).  Anyway, rand_hex_2 won't
242666 [beingthexemp] cool, thanks. just to clarify. couple variable names needed changing
243044 [ryand-ruby@z] We're using uuidtools at work and it is quite possibly the worst code
243065 [gwtmp01@ma .] parts I quoted above...
243076 [ryand-ruby@z] No, you're right, but for the most part, it really doesn't matter for
243231 [assaf.arkin@] A random number will work fine if you want something that looks like a
243249 [beingthexemp] For what i'm working with it won't really matter. Trying to use as
243561 [eden.li@gm i] You might want to consider renaming them in your project so that

You thoughts/philosphies on manual garbage collection
242636 [donn@cm cm .] The process that initiated my message earlier (about deleting array
242639 [ara.t.howard] if you can fork - that's the best - then you just let each child's death clean
+ 242703 [shortcutter@] To OP: generally "manual" GC is considered bad since it interferes with
+ 243022 [vjoel@pa h. ] One caution: mark-and-sweep GC and fork don't always play well together,
  + 243394 [dan-ml@da 42] That's pretty disheartening news to me. I had plans to make a fcgi-like
  + 243441 [gwtmp01@ma .] I think you are describing a different situation than the OP and Ara.

Complete beginner needing help
242637 [ben.wilmott@] I've just started to teach myself Ruby and writing some very simple
+ 242642 [rajsahae@gm ] Nothing is wrong with your code.  AFAIK, that's just the way Scite
+ 242955 [rubygeekgirl] It's the way Scite is handling cmd... What I do on the rare occasion

Managing Environments for ruby apps
242640 [robert.evans] Over the last couple of years I have accumulated a fair amount of
243029 [vjoel@pa h. ] If your file system supports symlinks, you can have something like this

methods that affect subsequently defined methods
242643 [molla5@ya oo] I want to implement methods like Ruby's protected that will effect some
242649 [transfire@gm] You might try facets annotations library.

error message help
242645 [rajsahae@gm ] String (TypeError)
+ 242646 [molla5@ya oo] ...
+ 242647 [beingthexemp] try

[ANN] rubyforge 0.4.1 Released
242652 [ryand-ruby@z] rubyforge version 0.4.1 has been released!
threads.html
top