56858-57502

56652-57446 subjects 57093-62885

^ Ruby and Expect/Tcl
56858 [minhtang uwm] I am new to ruby, and I would like to know whether there is something
+ 56914 [jfontan cesg] Some time ago I started a module to use libexpect from ruby but I finished
| 57024 [minhtang uwm] Thanks alot for the info.
+ 56915 [djberge qwes] There is an expect module out on the RAA (www.ruby-lang.org/en/raa.html)

^ Another elementary problem... :-(
56861 [ ted php.net] #!/usr/bin/env ruby
56863 [Juergen.Lind] say
56864 [ted datacomm] It worked!  Thanks so much.  When you said "Class method"/"Instance method", the light flickered on.
56890 [christopher.] ####################

^ Any Documents on HtmlParser
56862 [ganesan-ml g] I am looking for a Ruby base HTML Parser,
56879 [jean-francoi] <URL:http://www.python.org/doc/current/lib/module-sgmllib.html>

^ Is %f formatting broken?
56866 [ted datacomm] sprintf ("%d days %02d:%02d:%02.6f",@DD,@hh,@mm,@ss)
+ 56868 [matz ruby-la] But that's how printf(3) works.
| 56871 [ted datacomm] You're right...  I know how to get around it, but it's not pretty; primarily because of the leading 0 on the decimal portion of the number. :-(
+ 56872 [spoon-dated-] The '.6' part is the number of digits past the decimal point.
  56873 [ted datacomm] <slaps forehead>Yep! ... I should have known that all the way back from my FORTRAN days...

^ ruby
56876 [billarosa ho] I am a student in Computer Science, I downloaded Ruby for the first time.I
56877 [decoux moulo] Well, it really depend on what you want to do. At ruby level, you can

^ ruby
56878 [billarosa ho] I am a student in Computer Science, I downloaded Ruby for the first time.I

^ Sort by hash element
56880 [tim bates.id] If I have an array of hashes, eg
+ 56881 [decoux moulo] Well, you can give it a block
+ 56963 [flori nixe.p] a = [...]

^ set operation
56882 [xrfang hotma] Nice to mee you all here. I'm new to ruby although I have learned many
+ 56883 [tim bates.id] I don't know what 'in' is used for, but another way to do this might be
| 56885 [nobu.nokada ] array_of_strings.include?(myString)
| 56886 [gsinclair so] I've often thought that Array#=== should do the same thing as Array#include?
| 56891 [dblack candl] Don't forget that === is the case equality operator, so that would
+ 56884 [decoux moulo] Well, you can perhaps use Array#include?

^ Documentation for REXML
56888 [briqueabraqu] Does anyone have the documentation for the REXML library? I need to

^ Re: Another elementary problem...
56895 [christopher.] Juergen,
56900 [dblack candl] class A
56981 [gsinclair so] I've stored this at http://www.rubygarden.org/ruby?ClassMethodsTutorial.

^ Knowledge Base (Re: set operation)
56898 [xrfang hotma] It's very exciting to see that the Ruby community is quite active. Thanks
+ 56899 [dblack candl] You can search the ruby-talk archive at <http://www.ruby-talk.org>.
| 56904 [chrismo clab] And also here: http://groups.google.com/groups?q=group%3Acomp%2Elang%2Eruby
+ 56982 [gsinclair so] Check out the FAQ (http://www.rubygarden.org/iowa/faqtotum) as well.  Also see
  56994 [mikkelfj-ant] Thanks
  56995 [mikkelfj-ant] I should add that the more official link to an article, once the id is know

^ explicit destroy
56907 [coquelle eni] Is there a way to explicitly destroy an object ruby ?
+ 56918 [lyle users.s] No, you need to get rid of all references to that object and then let
| 56929 [hal9000 hype] I can see the movie now: _Garbage Collect Another Day_...
| 56934 [dblack candl] sprintf("%.3d", ?\a)  ...
| 56947 [lyle users.s] I am so lazy that I just fired up IRB and typed this in instead of
+ 57271 [ysantoso jen] If you want Jinx to be notified when Bond died, then it's

^ Thanks! (Re: Another elementary problem...)
56917 [christopher.] Wow, that was great, thanks very much!  There is a lot of great info here. I

^ _with_index
56919 [martindemell] Along the lines of +=...

^ ranges and the 'times' method
56920 [djberge qwes] 3..5.times{ puts "yo" } -> what do you *think* this will do?
+ 56921 [decoux moulo] Well, you want #upto no ?
| + 56922 [decoux moulo] return self
| + 56935 [djberge qwes] Yes, I realize that.  I was just making a point. :)
|   56936 [decoux moulo] You want an error, with this
|   56945 [djberge qwes] Is that a terse way of telling me it's a precedence issue? ;)
|   + 56950 [decoux moulo] Well, actually #upto is defined only for Integer and String (I
|   + 56956 [martindemell] There's always each - (3..5).each {|i| p i}
+ 56923 [dcarrera mat] I think that it will be parsed as
+ 56924 [jfontan cesg] You should put the range inside ().

^ Strings and substrings
56930 [dcarrera mat] str = "hello world"
+ 56932 [coquelle eni] it's the ASCII code of the caractere
+ 56961 [batsman.geo ] substring starting at index 0, length 0 => empty string
+ 57035 [angus quovad] 104 is the ASCII code of 'h'.

^ DRb & Threads ...
56942 [dmartenson m] I have a Ruby application that is comprised of two threads. One thread
56985 [m_seki mva.b] Yes, you need it and work well.
56992 [dmartenson m] Thanks for the example.

^ Array#and? and Array#or? methods?
56948 [jdevries pfr] Is there some reason the following methods on Array aren't included as
+ 56951 [dblack candl] a = [1,2,3,4]
+ 56954 [eban os.rim.] Ruby 1.7 has Enumerable#all? and Enumerable#any? .

^ Does any have the reference library that was on http://www.rubycentral.com
56958 [paquerette p] I can't display this site anymore and there online doc was very usefull...
56959 [dcarrera mat] They are having DNS problems.  Use http://165.193.123.250/
56962 [paquerette p] I just love you ;o))

^ Vim and Ruby
56960 [brailsmt yah] There was a recent post to the vim ML about including ruby support in
+ 56989 [cparrish cox] Are there any rpms of ruby support in VIM? I had to recompile.
+ 56990 [gsinclair so] That's nice.  I remember spending a while compiling it in myself, and I haven't
  56998 [brailsmt yah] Do you mean ideas for scripts using ruby and vim?  I have posted two
  57011 [gsinclair so] haven't

^ call-by-reference problem again
56967 [xrfang hotma] I encountered the call-by-reference problem, which was discussed before
+ 56970 [billtj y.glu] In general, for the Ruby built-in classes such as String, the methods are
| 56972 [Dave Pragmat] That's not really the point. A ! method modifies the state of an
| + 56974 [xrfang hotma] In my class, I read some string from a text file, and store it in a
| | + 56977 [dblack candl] str.replace("")
| | + 56986 [billtj y.glu] I assumed that changing the state of an object using instance variables is
| + 56978 [xrfang hotma] Another problem about reference is that,
|   + 56979 [dblack candl] It depends what you mean by "modify d".  I have a hunch you might be
|   + 56987 [billtj y.glu] I don't think your statement above is right.  In Ruby, if you have
|   | 57014 [xrfang hotma] In my test the Arrays are all pointing to the same object, but the
|   | 57419 [billtj y.glu] Can you give me the code where arrays are behaving differently from
|   | 57426 [xrfang hotma] I modified my code, I'm afraid that I can't find it. It is like the
|   | 57459 [batsman.geo ] Yes, because they are all the same array :)
|   | 57469 [xrfang hotma] I think it is explained already in the discussion. I am clear now, but I
|   | 57483 [austin halos] a=b=c=d=e=[1, 2, 3]
|   | 57491 [batsman.geo ] But it is not! :-)
|   | 57502 [xrfang hotma] I thought this problem over, and I admit I'm wrong, what I see the
|   + 57016 [bulatz integ] it's because you use self-modifying methods in one case and create new
+ 56975 [dblack candl] What's happening here is that you've got a local variable, str, and
+ 56976 [billk cts.co] I'm confident the gurus can give more precision in their replies,
+ 57013 [bulatz integ] def test!(str)
  57033 [nemo hellotr] ruby is not created with ability to modify parameters in mind. so you
  57050 [bulatz integ] ya, ya, of course :)  i'm not so dumb ;)

^ MD5
56969 [RembrandtAka] Could it be that the results of the MD5-Digest algorithm implemented in
+ 56971 [sebastian_ka] You forgot about the newline character that 'echo' produces by default.
| 56983 [RembrandtAka] Yes, you're right. What a stupid mistake...
+ 56984 [huber alum.w] irb(main):004:0> MD5.md5("hello\n")
+ 56988 [spcoltri omc] hrothgar ~ % echo hello | md5

^ Mapping output to an FXText window
56980 [helgaorg yah] I'm attempting to map output of a 'system' call
56991 [lyle users.s] You might want to take a look at the inputs.rb example program that
+ 56993 [jason persam] ...
+ 56996 [nobu.nokada ] Sorry, but not yet.

^ Fast Ruby web server
56997 [mikkelfj-ant] I was just looking at Tiki which recommended esehttpd in the documentation.
57186 [ruby-talk wh] Thanks a lot for the link.  I've been playing with this web server for

^ Re: Array#and? and Array#or? methods
57002 [jdevries pfr] Thanks for pointing out Enumerable#detect.  I just started looking at
57038 [batsman.geo ] I didn't know detect until I read about it in the reply to your first

^ Shoeboxes and Bindings
57005 [jweirich one] Sorry for the long post.  I've been observing several threads recently
57009 [gsinclair so] Nice commentary, Jim.  I've thrown it on the Wiki at
57010 [botp delmont] I second that, sir Gavin. Many thanks, too.

^ inf-ruby.el broken in version 1.7.3?
57006 [jdevries pfr] I use emacs and run an inferior irb process within emacs (inf-ruby.el).
57023 [matz ruby-la] It works for me.  Could you give me more info?
57040 [jdevries pfr] version of irb that doesn't work: 0.9 (02/07/03)
57051 [matz ruby-la] Hmm, it might be a Windows port bug.  Can anybody reproduce this

^ [ANN] Spreadsheet/Excel 0.0.1
57007 [djberg96 hot] I am happy to announce that Spreadsheet/Excel 0.0.1 has been released into
57008 [botp delmont] Great Scott! This is even a lot better than vba programming inside excel.
57079 [montana buc9] Where do you get it at?
57080 [montana buc9] Sorry.

^ simple regexp question
57015 [xrfang hotma] if string=~/pattern/ then ...
+ 57018 [gsinclair so] Funny that.  My copy of "Ruby in a Nutshell" says that '!~' is an operator
+ 57020 [matz ruby-la] I guess "string !~ /pattern/" does.
+ 57021 [martindemell] Since method names can include !, this gets read as
| 57036 [michael_s_ca] Not to mention that adding a bit of whitespace around binary
+ 57022 [alan digikat] Perhaps your pattern isn't doing what you think it should or the string
+ 57039 [batsman.geo ] This is read as 'string! ~/pattern/', so ruby tries to call method '!'

^ (none)
57025 [ohmmokzim ho] I am a beginner.

^ use of FXSwitcher ?
57026 [coquelle eni] class Switcher < FXSwitcher

^ use of FXSwitcher ? --correct! (sorry)
57027 [coquelle eni] class Switcher < FXSwitcher
+ 57029 [decoux moulo] Try
+ 57188 [lyle users.s] Guy has already pointed out the misspelling of "initialize", which is a

^ can we ADD connection to FXShutterItem.button
57030 [coquelle eni] I'd like to add a call to an object FXShutterItem.button without loose
57190 [lyle users.s] 1. The shutter item's button sends a SEL_COMMAND message

^ Shared library paths on linux
57031 [blackrob jet] I'd like to build the shared library version of ruby on linux, but I don't

^ A lesson learned
57032 [gsinclair so] Folks,
+ 57042 [enric 1smart] If you have time, read "Code Complete" from Steve McConnell
+ 57047 [mikkelfj-ant] and D. Knuth: "early optimization is the root of all evil".
+ 57049 [mwilson13 co] I really appreciated this lesson learned about the development process

^ ruby DBD::Pg disconnection
57034 [geniusj blue] A pretty simple problem (to describe).  Basically what's happening is I

^ exerb
57037 [xrfang hotma] anyone used exerb? I tired with my program it worked fine. However, if I use
57074 [davem1957 ya] I had the same problem. I worked around it on my windows system by

^ FXRuby compile error
57041 [khindenburg ] (kvh@rachael)-(15:49)-(~/FXRuby-1.0.16)> ruby install.rb setup
+ 57054 [coquelle eni] this error is documented in the package install file
+ 57192 [lyle users.s] Please check the "Things That Can Go Wrong" section of the build

^ UTF-8 "bug": not in accordance with the unicode-3 specs
57043 [paul floorba] I noticed the following while reading article on UTF-8
57056 [matz ruby-la] Array#pack("U") and String#unpack("U") are UTF-8 packer/unpacker, so
57345 [akr m17n.org] Is there a way to detect the warnings from Ruby script?
57347 [matz ruby-la] Currently, no.  Probably I have to design warning API.
57348 [akr m17n.org] I see.

^ too clever?
57044 [xrfang hotma] Sometime, I think ruby is too clever. It automatically expand cmdline.
57045 [ oct zoy.org] My shell does the "*.doc" expansion if I forget to protect the *.

^ Crash on 1.7 on Win32 [Was: TkOptionMenuButton]
57046 [phlip_cpp ya] That does its (perfectly useless) thing on Linux, but on Windows it

^ A LOGIC ANSWER TO A LOGIC PROBLEM
57048 [winmillon ho] World Events are affecting the way we live.

^ root directory
57052 [emmanuel.tou] Right now I need in an application to recurse from the current dir to the
+ 57064 [emmanuel.tou] def root?()
+ 57094 [vjoel PATH.B] irb(main):004:0> File.dirname('/usr/local')
  57101 [emmanuel.tou] irb(main):001:0> File.split("/home")
  57103 [nobu.nokada ] No, File#split just returns File#dirname and File#basename, and
  57114 [emmanuel.tou] well, if we remove the final "/" it will be ok then?

^ A LOGIC ANSWER TO A LOGIC PROBLEM
57055 [winmillon ho] World Events are affecting the way we live.

^ Ruby Memory Profile
57059 [squidster te] I'm writing quite a quiet a resource hungry program (current about
57442 [drbrain segm] You mean memory consumption increases by 2MB/sec?  Perhaps you've
57466 [squidster te] Yeah. 2MB/s.

^ loop starting not from beginning
57060 [botp delmont] File.open("test") do |f|
57061 [phlipcpp yah] File.open("test") do |f|
+ 57062 [decoux moulo] #slice don't take a block as argument :-)
| 57085 [phlipcpp yah] Apologies to the newbie, but I think ... each ... of the rest of us can
| + 57086 [batsman.geo ] In
| | 57106 [botp delmont] Many thanks to Phlip, Guy, Nobu, and Batsman for the enlightenment.
| | 57109 [botp delmont] def Fp (file,skip)
| | 57111 [nobu.nokada ] Fp("input.txt", 4) {|line| p line}
| | 57112 [botp delmont] This is neat. Very Ruby, imho.
| + 57115 [decoux moulo] You have just asked what is wrong with something that you've not taken the
+ 57063 [nobu.nokada ] I'm not sure what trouble you've experienced, perhaps the file

^ inwoking irb from the middle of things
57066 [Radek Hnilic] i know that i can inwoke irb from middle of program, the smallest
+ 57069 [decoux moulo] Well, probably you can also look at debug.rb and see if you can modify it
| 57075 [radek hnilic] I got a help from NaHi
+ 57073 [nobu.nokada ] Irb works in separated binding.
+ 57479 [nakahiro sar] $ cat catch.rb

^ exit() called in ruby_run()
57068 [agentiamaya ] I've been working on Visual C and Ruby, I embed ruby into an
57070 [decoux moulo] It's normal
57071 [agentiamaya ] My program in ruby just create a file; I want use this file in my program in
57072 [decoux moulo] Can you post your program, if it has only few lines or send me in

^ A LOGIC ANSWER TO A LOGIC PROBLEM
57076 [winmillon ya] World Events are affecting the way we live.

^ webunit and multipart/form-data?
57077 [armin xss.de] I am unit-testing a simple CGI-app that uses

^ DSN-less connection (Re: exerb)
57078 [xrfang hotma] Thanks David.
+ 57334 [chrismo clab] should
+ 57464 [davem1957 ya] Correct. I just happened to be using a DSN in that sample. Here is a

^ A LOGIC ANSWER TO A LOGIC PROBLEM
57083 [winmillon ya] World Events are affecting the way we live.

^ A LOGIC ANSWER TO A LOGIC PROBLEM
57084 [winmillon ya] World Events are affecting the way we live.
57087 [batsman.geo ] [SPAM]
+ 57088 [spectra debi] Well... this is one of the new strains of spam. SA, which we have installed in
| + 57104 [tim bates.id] I installed SpamAssassin yesterday, and it's caught all of these. I didn't
| + 57116 [tom.hurst cl] SpamAssassin 2.50 should come with a bayesian filter -- it'll just need
+ 57091 [alan digikat] That's funny, my local SA happily filtered those messages.  It might

^ DollarUnderscore again
57089 [martindemell] Sorry if you see this twice on the ng - the mailing list rejected my
57095 [simon simon-] $_  The last string read by gets or readline in the current scope.
57098 [martindemell] Thanks!

^ BUKAN SEKEDAR UANG !!
57092 [4m3li4 indo.] Dear Netter,
threads.html
top