288639-367235

288502-364733 subjects 288916-358831

Too many open files (Errno::EMFILE) on Windows
288639 [jlott@ev lr ] It seems that a number of people have run into this problem in different
+ 288641 [ryand-ruby@z] File.open path, mode do |f|
+ 288644 [djberg96@gm ] # Code snippet in question
  288661 [jlott@ev lr ] Perhaps I was unclear as to what the problem is. The example code I gave

Prefixes _ and __ for object and class constants proposed
288642 [xcampanoli@g] I may have brought this up before, a long time ago, but something I want
+ 288645 [dave@pr gp o] I'm not sure I've ever bumped into the need for an object constant,
+ 288648 [drbrain@se m] In ruby, constants are more like variables that yell at you.

Ruby 1.9 Installation Woes
288660 [fedzor@gm il] I am trying to install ruby 1.9 on my mac (system details below).

reg exp question
288666 [laredotornad] If I have a variable @fax, how can I apply a regular expression to the
288676 [bbxx789_05ss] str = '1234abc5d6e7f8ghi'
288677 [bbxx789_05ss] \D is the symbol for any character except a digit, which is shorthand

Anyone familiar with ArachnoRuby and the Scriptolutions site?
288668 [donn@cm cm .] I'm a die-hard fan of the ArachnoRuby IDE.  But when I went to the

About Ruby Wx
288671 [muzaffar@mu ] I am beginner to Ruby and much interested to learn Ruby Wx, but still
288693 [devi.webmast] Tutorials, API docs, and a mailing list are all linked to from

New classes on inheritance
288680 [jeff.turcott] I'm trying to create a new globally available subclass upon the
288685 [nyarly@gm il] const_set(klass.to_s + 'Helper', class.new(PersonHelper))

REXML (1.8.6 p111) Document.write fails - "undefined local"
288684 [weyus@at .n ] All,

rubygems update/upgrade error...
288689 [bbxx789_05ss] $ sudo gem update --system
+ 288691 [dangerwillro] Check to see that your PATH has not been changed by a recent
| 288705 [bbxx789_05ss] PATH=/Library/Frameworks/Python.framework/Versions/Current/bin:/Library/boost_1_34_1/tools/jam/src/bin.macosxx86:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/mysql/bin:.
| 288744 [dangerwillro] hmm...
| 288761 [bbxx789_05ss] I guess I'm a little disappointed because when I originally installed
+ 288764 [bbxx789_05ss] That error message is a little confusing as well.  Notice the version
  288766 [dangerwillro] gem -v
  288776 [bbxx789_05ss] $ gem -v
  288778 [bbxx789_05ss] (I had to close all Terminal windows before the correct version would
  288779 [bbxx789_05ss] Updating version of RubyGems to 1.0.1

regular expression negate a word (not character)
288692 [Summercoolne] somebody who is a regular expression guru... how do you negate a word
+ 288694 [Summercoolne] i could think of something like
| + 288696 [joepeck02@gm] I took a long look at this and I came up with a number of different
| | 288701 [Summercoolne] thanks for your post.  a reason is that some text editor lets users
| | 288706 [joepeck02@gm] find/replace Ruby script that can deal with multiple files.  I call the
| | 288709 [joepeck02@gm] Mark Tolonen, those were the exact Ruby negative look-behinds that I
| | 288711 [joepeck02@gm] make a different utility only because of the complications that would
| + 288697 [nyarly@gm il] (?!snow)(\S{4})\s*(tire)|^\S{0,3}\s*(tire)
+ 288707 [mark.e.tolon] <_sre.SRE_Match object at 0x00FCD608>
+ 288718 [Summercoolne] to add to the test cases, the regular expression must be able to grep
| 288721 [bearophileHU] I presume there only the second tire has to be found.
+ 288724 [paddy3118@go] ...
| 288725 [bearophileHU] But in the OP problem there can be variable-sized spaces in the
+ 288765 [nospam-abuse] [A complimentary Cc of this posting was sent to
+ 288929 [gbacon@hi aa] The code below at least passes your tests.
| 288939 [news@is lu i] my $snow_tire = qr/
| 289032 [gbacon@hi aa] Yes, your approach is simpler. I assumed from the "need it all
| 289441 [news@is lu i] Yes, I assumed about the same, but thought it would be a nice
+ 288964 [ptmcg@au ti ] data =3D """
+ 289081 [ snk@gn .o g] Since Ruby does not have a negative look *behind* operator, I just used
| + 289098 [dan-ml@da 42] I think I have a solution that matches the OP's request
| + 289157 [boss@ai bl d] Aha!  I like your style.
|   289160 [james@gr yp ] I love that trick.  ;)
+ 367235 [ryan.holmes@] I know this is an old post, but was trying to do something similar and

OS X After 1.9 Upgrade I get common errors in ri, gem, etc.
288699 [joepeck02@gm] Around the first of the year I upgraded my OS X 10.5 laptop to Ruby 1.9.

[ANN] Join us for Vancouver's 1st RubyCamp this Saturday from 9-5
288708 [geraldbauer2] First a big thanks to our prime sponsor Engine Yard

win32ole.AppActivate broken in VISTA?
288716 [rbatzing@gm ] I have been trying to use the win32ole module on Vista. However, the
288772 [david.mullet] Bob-
288788 [hawkman@ge o] ...
288790 [jan.svitok@g] AppActivate searches by window title. That means the app must be

date format change on www.ruby-forum.com
288729 [summercoolne] on ruby-forum.com, the date is displayed as
+ 288751 [bobgus@rc .c] In many places, the date is formatted as 12 Oct 2008. This is shorter
+ 288767 [dirk.traulse] Considering the very different date formats around the world, I would

monitoring postgres transaction
288731 [gianmh@gm il] ...
288738 [reid.thompso] Explain what you mean by monitor.
288748 [gianmh@gm il] ...
+ 288750 [bobgus@rc .c] You could use Wireshark to look at the packets going from your
| 288752 [fwmailinglis] While I'm not aware of a ruby library for this, the API for postgresql
+ 288801 [reid.thompso] With the proper configuration flags turned on, you can query internal postgresql

Ruby Program dont STOP
288734 [w__magician@] with a infinite loop to print one String. I use linux (Kubuntu) and when
288737 [jg@co ne ti ] Check on your terminal if there is any key binding for CRTL+C like "Copy
288739 [w__magician@] No CTRL+C stop processes i use it in all other programs.
+ 288740 [jg@co ne ti ] # cat loop.rb
+ 288741 [phil@s1 6. e] instead of working with an infinite loop, you could trap the Crtl-C
  288742 [w__magician@] Work perfect :D
  288743 [shevegen@li ] I believe with "ri"

[ANN] Thin 0.6.1 Cheesecake release
288745 [macournoyer@] Hey all,
288753 [careo@fa tm ] Sent from my iPod Touch
288755 [careo@fa tm ] Sorry all. I was reading the list and fell for my daughter's

Scripting vim using ruby interface
288754 [stefano.croc] I know this should be posted to the vim mailing list, but I wasn't able to

Adding code/Extending methods after they have been written?
288760 [shevegen@li ] def p(some_input)
288762 [perfectly.no] Looks like a good use case for Aspect oriented programming.

Ruby milter and C code
288768 [barjunk@at g] and although it doesn't work as presented, I was able to get it
289342 [barjunk@at g] Another problem as occurred while trying to use this code.   I've been

ToolTips stopped working in FxRuby examples
288770 [RichardDummy] I'm running the button_with_tool-tip example from http://fxruby.org/doc/ch03s04.html.

Extracting Data from a Webpage
288773 [nonstickglue] I was wondering if anyone knew a way to extract the web page title off
+ 288774 [cwdinfo@gm i] It's a snap.
+ 288775 [bbxx789_05ss] require 'open-uri'
| 288777 [bbxx789_05ss] require 'open-uri'
| + 288797 [nonstickglue] I receive this eror message when trying this code.
| | 288820 [bbxx789_05ss] 1) Learn some basic ruby?
| | 288833 [nonstickglue] Anyone else know what the matter is?
| | + 288838 [bbxx789_05ss] 1) Post a simple example program that demonstrates your problem.
| | + 288839 [fedzor@gm il] I believe that $end means you're missing some sort of end delimiter,
| |   288841 [shevegen@li ] I believe hpricot, as fine as it may be, is a little bit overkill for
| + 288848 [bbxx789_05ss] While that regex works for www.google.com, in order for the regex to be
+ 288780 [w_a_x_man@ya] "www.google.com"[/(www\.)?(.*)\./,2].capitalize
+ 288849 [w_a_x_man@ya] require 'net/http'
  288860 [bbxx789_05ss] Nice.  I tested your code and it works for me.  But my reading of the
  288861 [joepeck02@gm] "Send a GET request to the target and return the response as a
  288879 [bbxx789_05ss] get()
  288880 [bbxx789_05ss] As far as I can tell, you should have to call start() on a Net::HTTP

[ANN] Rumai 1.0.0
288781 [ snk@gn .o g] Rumai

[ANN] Kwalify 0.7.0 - parser, schema validator, and data binding for  YAML and JSON
288791 [kwa@ku at -l] I have released Kwalify 0.7.0.

Fwd: [Ruby Forum] Message from user iberci
288792 [james@gr yp ] ...

[SOLUTION][QUIZ] Making Change (#154)
288793 [jesse.d.merr] ...
288799 [greut.lists@] [SOLUTION][QUIZ] Making Change (#154)
288884 [gm.vlkv@gm i] below is my recursive solution

Getting NameError when trying to create a form with multiple of the  same object
288802 [laredotornad] I'm trying to create a form where a user can submit 5 of the same
288845 [rick.denatal] <td><%= text_field("ec_line_item", "item_number", "index" => i %></td>

method_defined? doesn't see module methods?
288805 [matt@ti bi s] module M
288817 [stefano.croc] According to the ri documentation, method_defined? tells wether instances of
288831 [matt@ti bi s] Excellent, thanks! m.

[SOLUTION] Making Change (#154)
288807 [doug@ds if r] ...

[ANN] Reminder GoRuCo CFP - January 31st
288822 [joshknowles@] I just wanted to remind everyone that the call for proposals for

How to access a method when method-name is in a variable
288823 [lcalje@gm il] I have a method name stored in a variable. How do I now invoke the
+ 288824 [stefano.croc] my_object.send( my_var)
| + 288826 [lcalje@gm il] thats it, thnx!!
| + 289665 [lcalje@gm il] An other question, is it possible to assign a value to an attribute this
|   + 289666 [stefano.croc] my_object.my_var= 2000
|   + 289667 [sepp2k@go gl] If you use attr_writer :foo, it creates the method foo= which takes one
+ 289696 [lcalje@gm il] that makes sense, now I understand what send() is actually doing!

Fwd: Please Forward: Ruby Quiz Submission
288840 [james@gr yp ] ...

tail call elimination
288842 [hrvoje.blaze] Does ruby implement tail call elimination?
+ 288843 [phrogz@ma .c] On Jan 27, 4:42=A0pm, Hrvoje Blazevic <hrvoje.blaze...@ri.t-com.hr>
+ 292002 [pbrannan@at ] The ruby-optimizer module used to support this, but it only works on

ruport error message
288844 [tabing16@ho ] I was

Treetop parser (or PEG in general?) questions
288847 [phrogz@ma .c] I've been looking for something like treetop for a while now. Very
+ 288866 [phrogz@ma .c] I have a simple grammar as listed at the end of this post. In the
| + 288876 [rubyfan@gm i] I've been playing with TreeTop for a while now as well...
| + 288885 [no@sp m. le ] Just a tip: Treetop now uses my Polyglot gem, which hooks require,
| + 288887 [no@sp m. le ] I'll make a commentary first, leading up to your answer :-).
|   288928 [rubyfan@gm i] rule inline_atom
|   288953 [no@sp m. le ] Yes.
|   + 288996 [no@sp m. le ] Hmmm, it looks like I broke my own rule here, but I didn't.
|   + 289113 [rubyfan@gm i] OK, this approach seems to work (I'll need to try the additions you
|     289117 [no@sp m. le ] Same sort of thing: scan any rubbish not looking like "entity", then,
+ 288878 [no@sp m. le ] So was I - thanks Nathan! - and many of the recent improvements are mine.
  + 289023 [phrogz@ma .c] EndOfFile <- !.
  | 289055 [no@sp m. le ] That would be a good thing to add, and I think the meta-grammar
  | 289103 [phrogz@ma .c] I suppose I'm suggesting that it isn't badly needed, since it's
  | 289114 [no@sp m. le ] Oh, ok, I missed the . in your original. I thought that ! by itself
  + 299160 [rubyfan@gm i] #foo_grammar.treetop
    299179 [ibc@al ax ne] Are you sure? both cases work for me.
    299180 [rubyfan@gm i] rule comment_to_eol
    299182 [ibc@al ax ne] Yes sorry, I tested it via a bash script with command parameters, so=20

I Get A Ruby Trunk Make Error On Readline
288850 [joepeck02@gm] I have had difficulties with a number of programs since I installed Ruby
+ 288852 [raasdnil@gm ] I don't know if it is the problem, but I had similar problems until I
| 288855 [joepeck02@gm] Mike, your write-up is perfect.  Nice, short and sweet.  I wish that I
| 288858 [raasdnil@gm ] No problems, could you leave a comment on what you had to do to make
| 288859 [joepeck02@gm] Yup, just that when building readline use "make static" instead of just
+ 288853 [joepeck02@gm] Maybe I should have posted this in Ruby Core.

Ruby Script Under performance in CYGWIN environment
288851 [toankit.sing] I have written one ruby script to execute the regression testcases.
288857 [znmeb@ce ma ] Download the Ruby source (1.8.6) and recompile it on Cygwin using the
288919 [shortcutter@] What do these test cases do?  Is there any IO involved other than
288933 [znmeb@ce ma ] I suspected that but didn't have my Cygwin system handy. The operative

Fwd: Please Forward: Ruby Quiz Submission
288856 [james@gr yp ] ...

Module Global Hash
288862 [c00lryguy@gm] #!/usr/bin/env ruby
+ 288863 [greenewm@ya ] Remember that in Ruby, everything is an object and objects communicate
| 288864 [greenewm@ya ] I think what's going on here is that when the parser gets to the line
| 288865 [c00lryguy@gm] I thought of this, but I'm going to be using a system with many many
+ 288867 [gwtmp01@ma .] The way you've used it, user_hash is a local variable for the module
  + 288868 [c00lryguy@gm] Hey, thanks man. I was thinking about defining [] and []=, but I didnt
  + 288882 [shortcutter@] You do not need to inherit from the new struct class, instead you can do
    288892 [james@gr yp ] User =3D Struct.new(=85) do
    288894 [shortcutter@] Of course.  Unfortunately it does not work with class constants

[ANN] Ramaze 0.3.5
288869 [m.fellinger@] This time we are proud to announce Version 0.3.5 of Ramaze, the light and
288915 [james.britt@] Outstanding.

[ANN] Ruby-VPI 20.0.0
288870 [ snk@gn .o g] Ruby-VPI

what's the diff between puts y and puts "#{y}" in class_eval
288872 [neeraj.jsr@g] Look at the code.
288873 [matz@ru y- a] Just because #{y} is expanded at compile time, so that class_eval

Coding Ruby Extension with C++ on Win32
288875 [daniel.akeru] ...
+ 288906 [kbloom@gm il] Try writing the whole OO interface in C++, and letting SWIG do the
+ 292000 [pbrannan@at ] The problem is not that the methods are static; it's that they don't

Logical Operations on Strings
288877 [_mwryder@wo ] Is there a bitwise and for strings that I am missing?  I tried the
288881 [shortcutter@] I believe this implementation is flawed because it returns a string
288936 [_mwryder@wo ] Actually I designed it that way so that I could change only part of the
+ 288945 [adam.shelly@] Are you looking for something like this?
| 288976 [_mwryder@wo ] That is much better, I will have to read up on pack and template strings
+ 289003 [shortcutter@] Ah, ok, then this was on purpose.  Personally I'd consider an element

How to track down a function
288883 [rapide@on in] I have a very large program with a lot of dependencies (objects,
288888 [shortcutter@] You can use set_trace_func to trace execution and build up a data

Installing 1.x rails trough gem?
288893 [gradisteanuc] I am new to this framework (even to ruby) and followed some books got
288896 [mg@ha el of ] try gem install rails -v 1.2.6
288904 [gradisteanuc] That worked, thanks.

Disable database support ?
288895 [gradisteanuc] By default a new rails project comes with database enabled (by adding -d
288983 [halostatue@g] Ruby != Rails.
288992 [wieczo.yo@go] You might try ActiveRecord in a console application first. There are

Sketchup: Constructing Triangle with Ruby
288897 [alexander.gr] i'm constructing triangles with ruby and try to plot them within
289142 [gdprasad@gm ] The first and last points may differ as they are built out of floating
289299 [alexander.gr] Well... I don't think so. The first and last point are exakly the same,
313739 [promos@bu ch] If you want a 3 sided shape, pass 3 points (AKA vertices) to

when to use PEP treetop vs regexp
288903 [bitdoger@ya ] on a practical basis when would want to use treetop parse over using
288909 [phrogz@ma .c] 1) If you can't do it in Regexp (e.g. recursive nested parens), use

Adding instance variables using module include
288907 [me@mi eh ga ] module VisitMemory
+ 289011 [me@mi eh ga ] module VisitMemory
+ 289019 [shortcutter@] require 'set'

Re: what's the diff between puts y and puts "#{y}" in class_
288910 [neeraj.jsr@g] Thanks for the answer but I couldn't quite follow it.
+ 288914 [decoux@mo lo] Well, when you write this
+ 288987 [ryani.spam@g] class T
  288989 [bbxx789_05ss] Thanks for the explanation,   I've been watching this thread and waiting
  289062 [ryani.spam@g] Yep, you've got it exactly.

error in map.connect
288912 [varun.rajesh] I wanna run my welcome controller after typing just
threads.html
top