357621-386460

357463-375227 subjects 357878-358487

RTranslate Gem (Open-URI) and Encoding
357621 [brent@bj hn ] I'm using the rtranslate gem (sishen-rtranslate) to handle translating
+ 357626 [richard.conr] You need to specify encoding in your ruby script. Ruby (1.8 at least, I am
| 357627 [brent@bj hn ] I had the $KCODE variable set.  It didn't seem to do anything in this
+ 357634 [usenet-nospa] The amusing part is that the first one looks fine to me.
  + 357636 [jonathan@jm ] Indeed.  The first one is properly encoded in UTF-8, the second in ISO-8859-1.
  + 357709 [brent@bj hn ] Where would I specify the encoding to fix this problem?  And yes, I just
    + 357710 [jonathan@jm ] Are you using ruby 1.8 or ruby 1.9?  In 1.9, you should do
    | 357719 [brent@bj hn ] I'm using 1.8.7.  I don't think it's the terminal but I'm not entirely
    | + 357723 [jonathan@jm ] -Jonathan Nielsen
    | + 357763 [echristopher] Make sure PuTTY is set for UTF-8.
    |   357857 [brent@bj hn ] Aha!  Well that fixed the problem of being able to see the correct
    + 357717 [usenet-nospa] There, I can't help you.  I don't understand encodings at all.

Ruby conditionals subtlety?
357622 [ff@on be t. ] Anyone know why thse two forms of "unless" behave differently?
+ 357624 [damnbigman@g] From playing around it doesn't look like unless is "behaving differently"
+ 357630 [ryand-ruby@z] % echo "foo =3D true unless defined?(foo)" | parse_tree_show=20
  357632 [ff@on be t. ] Cool, any chance you could give a short description for those of us that
  357641 [ryand-ruby@z] parse_tree_show
  357642 [ff@on be t. ] Thanks. To make sure I understand:  In the first case,
  + 357647 [ryand@ze sp ] that=20
  + 357648 [ryand-ruby@z] that=20
    357650 [ff@on be t. ] Thanks.  I sometimes use it in Rails partials rendering, where I may
    + 357659 [albertschlef] BTW, I wonder,
    | 357670 [ryand-ruby@z] You=20
    | 357747 [b.candler@po] if false
    | 357769 [echristopher] is because the assignment inside the conditional hasn't been parsed yet, a=
    | 357790 [b.candler@po] irb(main):001:0> bar = 123
    | 357806 [echristopher] Ah, thanks -- I wasn't grokking the parse-time/runtime distinction in
    | 357811 [b.candler@po] Almost - perhaps I muddied things a bit. At parse time, in the above
    | 357812 [b.candler@po] defined? does appear to be a rather odd beast though. You'd have to dig
    + 357669 [ryand-ruby@z] var ||= default

Adding self to Enumerable
357623 [glenn_ritz@y] I would like to add self to an Enumerable object in Ruby 1.9, like in
+ 357625 [glenn_ritz@y] I posted this earlier but did not enable email notification.  I've done
| 357629 [ryand-ruby@z] done=20
+ 357628 [ryand-ruby@z] #{e}" }
| 357631 [glenn_ritz@y] I want to be able to refer to the array receiver inside of the block.
| + 357640 [aaron@te de ] %w(froot loops).instance_eval {
| + 357661 [shortcutter@] What is the point of that?  I mean, you can *always* have a reference to
|   357682 [glenn_ritz@y] Sometimes in statistics it's good to be able to access the previous
|   357685 [shortcutter@] to
+ 357638 [sepp2k@go gl] module Enumerable
  357653 [glenn_ritz@y] Posted by Aaron Patterson (Guest)

System handling of undef_method
357644 [paulf@a2 li ] When a method is undefined, does the code hang around as orphaned code,
357645 [matz@ru y- a] If the method is defined in the undef'ing class, the code will be

MiniMagick Problems on 64-bit OS.
357651 [alex.decaria] I'm running the following 5 lines of ruby code.

OPN 2001 barcode reader
357654 [dglnz2@gm il] I am after some help in how best achieve the automated downloading of

Prerelease of Ruby-pg 0.9.0
357655 [ged@Fa ri MU] I'd like to announce the imminent release of version 0.9.0 of the
357807 [jack@ja kc r] I gave it a quick test on ruby 1.8.7 (2010-01-10 patchlevel 249)

How watir reads the page source.
357656 [bhavesh1_sha] Currently i am using ie.html and ie.text to get the page source and then

Global variables usage
357657 [infibit@gm i] I declared two files.One to hold the value of a global variable.And the
357660 [botpena@gm i] where in this code (gprint.rb) does it say that you are accessing the
357664 [infibit@gm i] Load and require execute the complete program..I want only the value of
357675 [shortcutter@] Well, there's an obvious solution to that: place the global variable
357712 [perrin@ap th] =2E . . or edit the file you're loading/requiring so that it will only

reuire 'socket' modules?
357663 [infibit@gm i] I have a sort of minimal ruby environment.I need to get socket
357701 [shortcutter@] It depends what you want to do.  Ruby has a number of high level
357729 [infibit@gm i] I just want to know the associated socket modules (libraries,etc..)
357731 [rogerpack200] do

using secure memory
357666 [perrin@ap th] I'm writing a utility that needs to use secure memory (that is, won't
+ 357671 [aaron@te de ] What do you need to do exactly?  Are you going to be allocating the
| 357715 [perrin@ap th] I'm basically just looking to ensure that any data a small program
+ 357735 [ryand-ruby@z] Don't worry about it and employ the OS's option for secured virtual memory?
  357736 [perrin@ap th] y?
  357737 [ryand-ruby@z] won't
  357739 [perrin@ap th] I know that one does not need to reboot a computer to have a guarantee

System handling of undef_method
357673 [paulf@a2 li ] When a method is undefined, does the code hang around as orphaned code,

Get Goolge Result
357678 [treep_ir@ya ] puts "Please Enter you word for search in Google.com:"
357690 [eustaquioran] If you just want that Google spits the HTML result, you can use something like
357691 [treep_ir@ya ] no i wanna just show me result link
357692 [eustaquioran] What result link? You can have thousands of links on the search result.
357694 [treep_ir@ya ] i wanna just show me result of link
357695 [eustaquioran] Did you just run the code I sent you?
357698 [treep_ir@ya ] what should i do ?
357699 [matt@te hn r] Find someone else to do your homework for you?
357700 [treep_ir@ya ] see
357704 [eustaquioran] You should run the code I sent you. If you can't do that, I give up. :-)
357706 [treep_ir@ya ] i cant
+ 357708 [usenet-nospa] You were provided with the code.  If you can't figure out how to obtain
| 357741 [walton@vy er] We've been through this same dance with (I'm  betting) the same person
| 357743 [josh.cheek@g] # using 1.9.1 (I upgraded, finally, thanks to rvm!)
+ 357714 [perrin@ap th] Eust=E1quio Rangel gave you an example of how to use the OpenURI module,

System handling of undef_method..Reason for Double Post
357679 [paulf@a2 li ] The IP address used by ruby-talk, '221.186.184.68' is listed on
357748 [b.candler@po] You can see that it has blocked the entire netblock (212.184.0.0/13 -

[ANN] DNote 1.2
357680 [transfire@gm] Released DNote 1.2 yesterday. DNote collects developer's notes from

Libraries for JPEG resizing in Windows Environment
357684 [alex.decaria] I'd like an idea as to what other image processing libraries are
357686 [kyleaschmitt] Camellia is more image recognition/computer vision type stuff.
357689 [alex.decaria] Thanks Kyle,

Spreadsheet Date format
357693 [regexes@gm i] I'm trying to use the Spreadsheet library to create a spreadsheet.
+ 357932 [regexes@gm i] It helps to read the documentation... :-)
+ 386460 [priyankapath] To fix the date format of spreadsheet by specifying.

NET:SSH fails authentification with :keys - ssh works
357722 [psychomachin] ssh.exec!("mount /persistent")
361617 [cliffcolon@h] I am seeing the same issue. Does anyone know how to resolve this?

Ruby Bezel - Experiment in Dependency Heaven
357749 [transfire@gm] I've been playing around with an alternative for loading dependent

Specifying Ruby Version from Command Line
357750 [alex.decaria] I have two versions of Ruby installed (1.8 and 1.9).  When starting a
+ 357751 [hassan.schro] Use the full path, or change your PATH environment variable to put
+ 357753 [joelvanderwe] $ ./configure --help | grep suffix
+ 357754 [eustaquioran] What OS are you running, and how did you install both versions?
| + 357756 [semmons99@gm] to change the path to 1.8, 'setruby 1.9' to change the path to 1.9 and I
| + 357764 [alex.decaria] I am using Windows 7 Professional (64-bit).  I previously had Ruby 1.8.6
+ 357758 [josh.cheek@g] I've found that rvm handles this beautifully.

Foundations of RSpec
357759 [josh.cheek@g] According to Amazon, this book is supposed to be released already. I've been
357766 [eustaquioran] Ouch, I thought the David Chelimsky's book was the first - and only
357768 [josh.cheek@g] com
357771 [tonyspore@ma] # help

segfaults from the 'object-free' dtrace probe
357760 [dane.jensen@] Has anyone had any luck with the 'object-free' dtrace probe... ever... on
357775 [dane.jensen@] Ahhh... I think I see what it's doing, at least in a simple test case

Threads vs Processes
357761 [s0nspark@gm ] I have just switched back to Windows from the Mac/Linux world and my
+ 357784 [rlfoster1@co] You might take a look at SizedQueue. There's a good description of it in
| 357792 [s0nspark@gm ] Thanks, I will check that out...
+ 357788 [shortcutter@] Processes are fairly independent.  Threads share the same memory space
  357791 [s0nspark@gm ] Thanks - that clears things up a good bit for me :-)
  357794 [walton@vy er] Correct.
  357797 [shortcutter@] s a

Including gems in a bundle with Rawr (Jruby)
357762 [echristopher] I'm able to make a jar/.exe/.app out of a simple script with Rawr, but
+ 357805 [echristopher] All right, I'm just going to paste my code. It's possible no one
+ 357809 [james.britt@] Is the gem installed on all system were the rawr-packaged app will run?
  357819 [echristopher] Thanks for your response.
  357834 [james.britt@] Wherever you want to place it, you have to be sure that the load path
  357930 [echristopher] ou
  357931 [Rob@Ag le on] (Disclaimer: This answer is based solely on Ruby knowledge, not JAR
  + 358597 [malte.beran@] i have no manifest file.
  + 358628 [echristopher] I'm not sure at this point; I seem to have messed something else up in

[ANN] rubygems-update 1.3.6 Released
357765 [drbrain@se m] rubygems-update version 1.3.6 has been released!
357823 [wayneeseguin] Eric,

Running two versions of Ruby - Lessons Learned
357767 [alex.decaria] After experimenting with Ruby 1.9 I've found I really like it and wanted
+ 357772 [dane.jensen@] On Feb 20, 2010, at 5:50 PM, Alex DeCaria
| 357783 [alex.decaria] Thanks.  I was wondering what the difference  between system and exec
+ 357782 [s.korteling@] If you have (or create) on your desktop a shortcut to your .rb file, you
  357787 [alex.decaria] I thought there must be a way to do it without writing a separate

Read efficiency?
357776 [guyminuslife] I'm wondering if anyone knows much about Ruby's efficiency with IO#read.
357779 [guyminuslife] I hate it when I put my foot in my mouth. After further testing, I'm
+ 357786 [shortcutter@] Good that you did not use your real name. ;-)
| 357808 [guyminuslife] I know, right? I'm embarrassed I use this username elsewhere. And I
| 357810 [shortcutter@] Just an additional hint: you can dramatically reduce the String creation
| 357837 [shortcutter@] Rehearsal -----------------------------------------------------------------
+ 357854 [rogerpack200] I believe that Rubinius has less overhead "hit time" -- as long as you

Re: rubygems-update 1.3.6 Released
357780 [sutniuq@gm .] Hm, I just upgraded but it seems that RubyGems still thinks it's 1.3.5.
+ 357853 [rogerpack200] Thanks for the release. Seemed to update fine here on doze.
+ 357861 [sutniuq@gm .] I just updated RubyGems again, and now it shows the correct version. I'm
  357894 [drbrain@se m] (2010-01-10=20

Yet another rounding issue
357796 [manuska@gm i] At school I was taught that five is always rounded up. Later on I've
+ 357798 [jeanjulien.f] I guess bigdecimal should be the answer
+ 357799 [mo_mail@on h] Actually, this is because of the way floating point variables are
  357802 [manuska@gm i] Well this is basically same as my

CGI (read multipart form): Accept-Charset encoding error (CGI::InvalidEncoding)
357803 [sfischer@wt ] I'm working on a parser for race-simulation logs, which read data from a
357865 [david_v_wrig] Maybe try adding
357906 [sfischer@wt ] Works, but "ISO-8859-1" did not. I'm a beginner in cgi-programming.

[ANN] Red Dirt RubyConf CFP Ending in One Week
357804 [james@gr ys ] Just a quick reminder folks that the call for proposals for Red Dirt =

Difference between system() versus exec Kernel methods
357814 [alex.decaria] I'm trying to understand the difference between the Kernel.system and
357815 [mguterl@gm i] ri Kernel#exec
357816 [alex.decaria] That's well and good.  I've already read the documentation.  But, based
357817 [walton@vy er] In MSDOS environments, the command is executed in
+ 357820 [echristopher] sed
+ 357822 [alex.decaria] Thanks!  That makes it clearer.  --Alex

"ubygems" load error
357818 [brw314@gm il] /usr/bin/ruby1.8: no such file to load -- ubygems (LoadError)
357824 [sophrinix@gm] Which gem is it?
357825 [ben@bl yt in] gems.
357826 [brw314@gm il] The gem is ffi, which is pretty widely used I think, for calls to C
357841 [jeljer@me co] is it maybe ruby1.9 only?

Module#set
357821 [transfire@gm] Wonder what other's think of this as a general purpose class method.

Complex type-checking
357827 [the.rodent.o] I have a number of methods that can take arguments in two different
+ 357839 [shortcutter@] Sorry, I can't.  Why do you want to do that? :-)
| 357840 [the.rodent.o] Well, it seems to be..
+ 357843 [transfire@gm] On Feb 21, 10:43=A0pm, Ken Coar <the.rodent.of.unusual.s...@gmail.com>
  357856 [the.rodent.o] .. which would require lots of extra code to account for all

using Shoes as GUI
357828 [moomed2003@y] basically trying to create a shogi game board, but am getting a $end
357830 [echristopher] Try taking out ":board" after "class Movechecker".
357831 [moomed2003@y] I did i got the same error Eric syntax unexpected $end expecting Kend
+ 357832 [moomed2003@y] I think I got something I capitalized the c in Class and I took out the
| 357851 [steve@st ve ] You may want to post this to the shoooes mailing list, just send an email to
+ 357868 [clbustos@gm ] first end: for loop
  357900 [moomed2003@y] Cool this help at least now I don't have any syntax error, and my shoe

Ruby CMS
357829 [z3r0_f4ct0r@] I'm looking for a mature ruby based cms. Something like Slate http://slatecms.wvu.edu/ but a bit more active and mature.
+ 357833 [james.britt@] Radiant.
| 357846 [mark@th ma z] Or perhaps refinery
| 357888 [choesh@ho ma] ...
| 358085 [z3r0_f4ct0r@] Well out of all of the m refinery seems the most complete. Though I really think Slate CMS is heading in the right direction.
| 358086 [z3r0_f4ct0r@] ...
+ 357835 [josh.cheek@g] ...

Ruby Installation
357836 [to.tom.mak@g] I have installed ruby from fedora repository (fedora12) with
357845 [b.candler@po] ftp.ruby-lang.org has all the previous version releases.

XMPP4r with ejabberd
357838 [krishna.rokh] I have been trying to get ejabberd to work with XMPP4R and have had

International Journal of Electronics, Information and Systems (IJEIS)  Call for Paper
357842 [ijeiseditor@] International Journal of Electronics, Information and Systems (IJEIS)

Re: Difference between length and length()
357844 [b.candler@po] In general,

Debug ruby script
357847 [thillaibooks] Is there any guide for rdebug in ruby script
357889 [rogerpack200] I'm not sure if it's possible.

Binding#eval issue
357848 [transfire@gm] class Binding
357863 [b.candler@po] I tried this, and was surprised to find that 1.8.7 makes a special case
357866 [transfire@gm] Right. I thought that was idea because you want to know about the
357867 [walton@vy er] ...
357870 [transfire@gm] ses/Kernel.html#M005922

Ruby 1.9 and loss of Windows 'right-click/edit' option
357849 [alex.decaria] With Ruby 1.8 (Windows OS) I could right-click on a windows icon and
357850 [s.korteling@] shift-right-click ,choose "open with" and you can reconfigure it. The
357859 [alex.decaria] Thanks.  --Alex

Menu-driven Console Application in Ruby
357852 [joseph.w.mar] I'm trying to create a console application with ruby on Windows.  I wish
+ 357864 [richard.conr] You should look at the ncurses gem/project.
+ 357886 [gabriel.horn] Neither one of these requires using curses which may be a good thing

OPN 2001 Barcode Reader
357858 [Steve@ru y- ] I hope this is of some use to you, please feel free to contact us.

statsample: A statistical package for ruby
357869 [clbustos@gm ] I like to invite you all to test and give some feedback on my ruby

Ruby Idiom To Retry open() Upto N Times Before Giving Up
357872 [dandiebolt@y] ...
+ 357873 [shortcutter@] irb(main):017:0> attempts = 3
+ 357874 [wyhaines@gm ] ui. Occasionally I run into a web site that times out or is unavailable for=
+ 357875 [marcelo.maga] def open_with_retry(url, n=10, delay=1)
+ 357877 [rick.denatal] ui. Occasionally I run into a web site that times out or is unavailable for=
+ 357879 [djberg96@gm ] ui. Occasionally I run into a web site that times out or is unavailable for=
+ 357884 [joelvanderwe] $ cat open-with-retry.rb
  357921 [shevegen@li ] attempt() looks actually pretty cool.
threads.html
top