373608-410139 subjects 374094-375238

File#truncate fills file with zeros
373855 [leslieviljoe] f = File.open(filename, 'w')
373856 [niklas@br ec] this is because opening a file with "w" truncates it.
373858 [leslieviljoe] aaaaaaaaah!

Ruby 1.9.2 commandline options
373857 [no@sp m. le ] ruby --help lists -E, which doesn't seem to work as advertised,
373882 [ammarabuali@] I'm not sure what you mean by work as advertised, but I would like to
373903 [no@sp m. le ] No, it still complains "invalid multibyte char (US-ASCII)" on
+ 373905 [ammarabuali@] AFAIK, BOM is not required for UTF-8 so it should work. Can you
+ 373929 [runrun@ru pa] I believe you're misunderstanding what internal and external encodings
  374020 [no@sp m. le ] Thanks, but I'm well aware of the magic comments.

Multiline code on IRB?
373860 [passionate_p] I am trying to write a multi-line small code in IRB, but it has no
+ 373862 [niklas@br ec] When you write a line that isn't finished (e.g. end a line with a
| 373896 [shortcutter@] In all other cases you can escape the line ending the same way as in a scri=
+ 373919 [groups@hj iv] ...

gets() not stopping to accept input
373861 [passionate_p] I am using "Programmers Notepad" to write Ruby code. I tried following
+ 373881 [timr@pr bo c] Unless you are specifying a file name on the command line, you probably
+ 373884 [passionate_p] The code I have shown in my original post is from the book: "The Book of
  + 373890 [ammarabuali@] STDIN is the default, so it's optional. The double quotes are required
  + 373892 [shortcutter@] Can you show us a transcript of the console session?  On what

Reporting tool
373863 [passionate_p] Which reporting tool I can use to integrate with a Ruby GUI app?
+ 373865 [ryand-ruby@z] ...
| 373867 [adao.raul@gm] I think he's looking for some tool like CrystalReport. right?!
+ 373883 [passionate_p] What vague? How you create reports for your Ruby app.?
| 373886 [ammarabuali@] One option: http://www.rubyreports.org/
+ 373908 [mustmodify@g] I agree this question is vague in terms of your requirements. Are you

[ANN] Mail 2.2.10 Release Announcement
373870 [raasdnil@gm ] I'm happy to announce 2.2.10.

[ANN] mongrel_service 0.4.0 Released
373872 [luislavena@g] mongrel_service version 0.4.0 has been released!

1.9 block parameters
373873 [johnsayeau@g] I've tried both netbeans and textmate. Neither of them like the 1.9

expected 1 times, but received it 0 times
373879 [arunsharmaen] I am initial level of rspec.i am getting a problem as

Thread problem
373885 [crizin@gm il] I learning ruby thread and faced to thread problem.
+ 373887 [nobuoka@r- e] I think that the reason of this problem is the simultaneous use of a
| 373899 [b.candler@po] Or more explicitly: sum = sum + local is not an atomic operation.
+ 373889 [justincollin] You are updating a shared variable "simultaneously" in separate threads,
  373893 [shortcutter@] Absolutely correct.  In this particular case using a shared resource

Extended ASCII character handeling
373914 [dnorcott@mt ] "200 Millionen Jahre spter                              # 17.39
+ 373915 [niklas@br ec] That would depend very much on how you scrape the data and if you handle
+ 373922 [shortcutter@] Depends how you read the data from webpages.
+ 373928 [dnorcott@mt ] I am using nokogiri (with Mechanize) to scrape the data and the data I
+ 373993 [b.candler@po] In ruby 1.9, you have to worry about this very much.

Ruby's inconsistency or an IRB issue ?
373918 [dunric29a@gm] I've discovered some strange behaviour in Interactive Ruby shell (IRB) I
+ 373921 [ammarabuali@] => :!
| 373925 [dunric29a@gm] => :!
| 373926 [ammarabuali@] I'm not familiar with Wirble, but #uniq should not leave identical
+ 373976 [dunric29a@gm] It really was a Wirble's issue the author was aware of. I find it an

Net::ssh - Drop User into shell
373927 [rilindo@gm i] I am trying to write a wrapper script that logs a person into a remote

Ruby Not observing DRY principle
373930 [flebber.crue] getting Ruby, far more than I got python I am doing more now in a
+ 373952 [shadowfirebi] ...
| 373954 [flebber.crue] Any ideas appreciated. I just need to understand how to get the flow
| 373955 [arturo.g.art] I don't really understand what you're trying to do there, but I think you
| 373956 [flebber.crue] it's
| + 373958 [arturo.g.art] Sorry.  I don't see where a foreach falls in there.  If your options are
| + 373959 [shadowfirebi] ...
| + 373963 [spoon@ki le ] That is an example of the strategy pattern!
|   373966 [shadowfirebi] It appears that my mail client is having trouble -- hence the blank
|   373995 [flebber.crue] Yes but this is how initially I started to write my code but then had
|   373999 [spoon@ki le ] That's entirely up to you.
|   374016 [flebber.crue] Can a case statement return multiple correct cases?
|   374024 [niklas@br ec] nope.
|   374033 [shadowfirebi] wins = []
|   374036 [flebber.crue] me
|   374064 [flebber.crue] w me
+ 374138 [rubfor@re it] As you are (so far) writing in a procedural style, I think foo looks

Ruby Jobs for a beginning programmer?
373932 [dartfrogger8] I've recently got interested in programming and have been teaching
+ 373951 [shortcutter@] This is highly dependent on the region of the world you are in.  Over
+ 373988 [dartfrogger8] Hm, the learning contract sounds interesting. I'm in the states, so I'll
  374026 [shortcutter@] AFAIK this exact dual system of education (mix of company and school)
  374057 [tim@ev i. om] I've heard that these exist, but rarely though in the states.

Windows and Rake package task - problems with tar
373933 [johngferguso] Ever see an issue with trying to package a gem like this: "rake
373939 [luislavena@g] Have you tried gnuwin32.sf.net tar?

ui snow leopard
373935 [johnsayeau@g] Is there a way to do ui with ruby on snow leopard(64 bit)?
+ 373936 [jose.halesga] MacRuby binds Ruby 1.9 with Cocoa and runs 64-bit.
+ 373937 [steve@st ve ] * Shoes (disclaimer: I'm a maintainer)

Ruby 1.9.2 UTF-8 Encoding issues whiles reading/writing files
373938 [grayphoque@g] My ruby 1.9.2 does some strange things when manipulating encodings
373940 [brabuhr@gm i] $ cat broken.txt

How to Use WATIR
373941 [sudeeppattna] I am completely new to WATIR.
+ 373945 [rubfor@re it] The Watir site has a number of tutorials you need to read.
+ 373950 [josh.cheek@g] 1. Save it in a text file, like query_google.rb (or whatever yours does)

Time question
373942 [eva54321@si ] ...
+ 373943 [dhruva.sagar] Time.now.-(86400)
| 373944 [eva54321@si ] ...
| + 373946 [rohitt@ho ma] ...
| | 373989 [b.candler@po] Time.send(:now).send(:-, 86400)
| + 373947 [dhruva.sagar] In Ruby everything is an object. When you do 1 + 2, you need to understand
+ 374060 [orgdotuk@ya ] Time.now cannot take any arguments.

Calling a bash script creates files as UID 501 ?
373953 [dreamcat4@gm] I have to run an installer script on the system, via ruby.
+ 373965 [shortcutter@] Hm...  What does "ls -l /usr/local/rvm/src/rvm/scripts/install" print?
| 373967 [dreamcat4@gm] -rwxr-xr-x 1 root root 13716 2010-11-18 12:48
+ 373968 [dreamcat4@gm] Just also to mention that -
  + 373980 [jose.halesga] ...
  + 373983 [wishdev@gm i] Good Morning,
    + 373985 [dreamcat4@gm] Ah,
    + 374021 [shortcutter@] Granted, this can easily be fixed with chown.  I'm not sure I understand
      + 374025 [wishdev@gm i] Good Evening,
      + 374035 [dreamcat4@gm] Like John - I also haven't bothered to look into this properly and am

SQLite3/Sinatra not returning results
373957 [alexg@ru ge ] This has been doing my head in all morning - I wonder if anyone can help
374338 [jonas@pf nn ] the problem is probably related to the different ruby versions since
374343 [alexg@ru ge ] Thanks. It turned out to be an String encoding issue. Sinatra was
374529 [b.candler@po] Ergh. I can replicate this, with ruby 1.9.2p0 (rvm) + sqlite3-ruby-1.3.2

Stange behaviour with files permissions on a windows mounted share
373961 [fred@la av .] I have a windows share mounted on a FreeBSD box, and I see the

Re: Ruby 1.9.2 UTF-8 Encoding issues while reading/writing files
373970 [grayphoque@g] Thanks for the tip.

Session question
373973 [papa019@gm i] Hy all!
373986 [niklas@br ec] That entirely depends on what you put into the session.

Simple, Two-Frame Terminal Application
373974 [btrichardson] I am in need of a way to develop a simple, two-frame terminal
+ 373984 [spoon@ki le ] What about having two processes that communicate over DRb, and use
+ 374011 [sentinel1879] Are you on a unix/osx or on Windows ?
| 374048 [spoon@ki le ] Ace, cheers for the tidbit!  I've never seen that before.  Time to make
+ 374053 [btrichardson] Thanks for responding. I like your option 1 with threading... how can I
  + 374054 [matt@te hn r] I've always used ncurses for that.  I found the book "Unix Programming
  | 374067 [btricha@gm i] Yeah, I just haven't found the documentation for Ruby's ncurses
  | 374080 [spoon@ki le ] Have you read the C documentation?  IMO ncurses is lovely!  It's
  + 374213 [sentinel1879] In my case, the terminal was not split up. I would use the last row for

Question on scoping
373975 [byrnejb@ha t] I clearly have either forgotten something important, or I never
373982 [shortcutter@] You have fallen in the method local variable ambiguity trap.
373987 [byrnejb@ha t] Thanks.  As soon as I read your note I had one of the head slapping
374022 [shortcutter@] What do you mean, mixing variables and accessors or slapping your head? ;-)
374149 [byrnejb@ha t] All of the above.

Multiple constructor in Ruby
373977 [arturo.bonec] I have a question about the constructor in Ruby.
+ 373978 [jeremy@bo p.] This is true for any method definition in Ruby, not just constructors.
+ 373979 [wagner.andre] The answer to both of your questions is yes. Well, you *can* implement it
+ 373981 [arturo.bonec] Ok, thanks to both of you for those quick replies!

Where to start from?
373990 [i_baseet@ho ] I want to be a professional web developer using Ruby. Where should I
+ 373991 [niklas@br ec] read this: http://mitpress.mit.edu/sicp/
| 373992 [i_baseet@ho ] What is that anyway? :) I want to learn Ruby, you want me to go to the
| + 373996 [tim@ev i. om] Learning from the past is exactly is necessary to become a professional
| + 373997 [sophrinix@gm] Rome wasn't built in a day. :-)
| + 373998 [spoon@ki le ] * Why does this program stack overflow?
| + 374000 [wyrd@co e- n] And a book such as http://www.powells.com/biblio?isbn=0201558025
|   374005 [zuerrong@gm ] ...
+ 374028 [cmdjackryan@] Go to college. No, really. Learning a framework or a language is easy.
+ 374038 [josh.cheek@g] To do Ruby on the web, you are basically talking about Ruby on Rails. I
| 374042 [cmdjackryan@] ns
| + 374047 [rubfor@re it] The original motivation of the N-ary Relational Model (ie the invention
| | 374052 [cmdjackryan@] Without set theory, math doesn't work. Any number space is a set (the
| + 374062 [josh.cheek@g] th
|   374068 [cmdjackryan@] are
+ 374040 [rubfor@re it] Go onto a web job site and type in Ruby. You'll then see lists of the

Ruby Programming
374001 [tridib04@gm ] I am new in Ruby. Can any one post a simple Program which requires
+ 374002 [jeremy@bo p.] Creating any object requires memory allocation of some sort.  Are you
+ 374003 [synfinatic@g] #/usr/bin/env ruby
+ 374004 [tridib04@gm ] I need to do this...
| 374031 [alexg@ru ge ] Sure. There's also the GC_NOTIFY and GC_DEBUG defines in gc.c and
| 374249 [tridib04@gm ] Can you tell me how to call those two?...And do I need to write some
| 374337 [alexg@ru ge ] There doesn't seem to be any mystery here, just search for GC_NOTIFY in
| 374609 [tridib04@gm ] @Alex Gutteridge
| 374622 [alexg@ru ge ] No, sorry. Your version is very out of date (~2003 I think!?!). You'll get
| 374624 [tridib04@gm ] But I am running on CentOS which supports this Ruby version only..I
| 374625 [b.candler@po] Compile 1.8.6 or 1.8.7, it will be fine. (Assuming you've got a working
| 374648 [tridib04@gm ] Okay I Have downloaded the Ruby 1.8.6
| 374650 [cmdjackryan@] Use an editor with a search function?
| 374704 [tridib04@gm ] There no GC_NOTIFY function under gc.c file in Riby 1.8.6 also..
+ 374199 [tridib04@gm ] I have done a coding
+ 374208 [tridib04@gm ] I am trying for the code
+ 374760 [tridib04@gm ] There is neither of this functions in Ruby 1.8.6 gc.c file also
  374934 [tridib04@gm ] Any One to Help me in this issue>.??..Its Urgent,

[ANN] kgio 2.0.0 - major API changes
374006 [normalperson] kgio provides non-blocking I/O methods for Ruby without raising

Descending ranges in Ruby
374007 [harryspier@h] Dear list members,
+ 374008 [pat.eyler@gm] 5.downto(1) { |i| puts i }
+ 374009 [harryspier@h] Thanks for this work-around but my question was not so much how to get
| 374032 [shortcutter@] IIRC a Range finds the next value via #succ.  And Fixnum#succ always
+ 374023 [vderyagin@gm] AFAIK, ruby simply considers values like (5..1) as empty range.
+ 374039 [maurice.diam] (1..5).to_a.reverse

Tomcat CPU spikes in Jruby web app
374010 [prachi.tripa] We have a Jruby on rails application deployed in tomcat. Our Jruby
+ 374012 [headius@he d] There's actually a bug similar to this that should be fixed in JRuby
+ 374019 [prachi.tripa] Thanks for ur prompt reply.
  374936 [headius@he d] Yes, I would recommend upgrading to 1.5.6. If you are using OpenSSL,

Eventmachine install error
374029 [ris58h@gm il] I get error, when i try to install eventmachine.
+ 374030 [niklas@br ec] Read the output. It suggests you to look into
+ 374037 [ris58h@gm il] Problem solved!

Sup and ruby-talk incompatability? Failure to send message body.
374034 [shadowfirebi] I've been playing with the ruby-based Sup mail client, and I've found that

Multi-line regular expression match question
374041 [guillermo.ri] I have been trying to create a solid regular expression to match a
+ 374044 [jgabrielygal] irb(main):018:0> s =<<EOF
| 374190 [guillermo.ri] Muchas gracias =)
+ 374045 [ammarabuali@] /^\|-:$.*?^-\|$/m
  374046 [ammarabuali@] I was under the impression that the reluctant versions of the four
  374191 [guillermo.ri] Thanks for clarification Ammar, it works perfectly, and also for the book recommendation very useful , thanks a lot

Ruby without commandline?
374043 [cancer10@gm ] First of all I am sorry if I am posting this in the wrong sections, mods
+ 374051 [cmdjackryan@] Ruby is more than a language for the web. If all you want to do are
+ 374088 [cmdicely@gm ] Yeah.

Problem with openssl library
374050 [mv200i@ho ma] Gentlemen,,
374239 [kinpoco@gm i] If possible, could you please let me know where did you download rpms from?

Re: method signature - do I use named parameters OR pass a hash
374056 [pablohstc@gm] Option 3
374093 [b.candler@po] def this_methods(params = {})

ifmapper 1.0.6
374058 [ggarra13@gm ] IFMapper, the popular mapping tool for interactive fiction, is now in

Install Nokogiri
374071 [panthe@li er] in two my server with Ubuntu I'm not able to install nokogiri.
374072 [astahl@hi .c] ...
374076 [panthe@li er] Thanks for your reply but I've just installed libxml2-dev...
+ 374078 [astahl@hi .c] ...
| 374098 [panthe@li er] I've try this combination in various format but nothing to do...
+ 374101 [brabuhr@gm i] And also lib xslt dev?
  374125 [panthe@li er] wget http://i.loveruby.net/archive/racc/racc-1.4.5-all.tar.gz

[ANN] unicorn 3.0.0 - disable rewindable input!
374081 [normalperson] Unicorn is an HTTP server for Rack applications designed to only serve

[ANN] Rainbows! 2.0.0 - minority rules!
374082 [normalperson] Rainbows! is an HTTP server for sleepy Rack applications.  It is based on

[ANN] Zbatery 0.5.0 - fork-free HTTP serving
374083 [normalperson] Zbatery is an HTTP server for Rack applications on systems that either

374084 [k.sahithi286] TRISHA IN A SPICY DRESS

contradicting unit test regarding blocks pass, bug in unit/test?
374085 [timrandg@gm ] require "test/unit"
374086 [timrandg@gm ] #In fact, calling a method within a block with top level return
374087 [timrandg@gm ] #In fact, calling a method with a block with top level return
374119 [niklas@br ec] probably because it returns from your test method without further

BUG IN test/unit!?!?
374090 [timrandg@gm ] assert_raise and assert_nothing_raise both pass running the same code.

BUG IN test/unit!?!?
374091 [timrandg@gm ] assert_raise and assert_nothing_raise both pass running the same code.

Plz anyone help me , how to write code for google login page .
374092 [venkatasiva_] Plz anyone help me , how to write code for google login page .
374100 [brabuhr@gm i] What is your goal?
374116 [adao.raul@gm] Do you want google app engine integration?