[#347493] Making an RDoc Template Gem — Intransition <transfire@...>
I want to create a new RDoc template and I want to ship it as a gem.
[#347499] FasterCSV - varying headers — Sean Mcknew <smcknew@...>
Hello,
[#347506] how do you do this — George George <george.githinji@...>
Given an array of strings e.g.
On Thu, Oct 1, 2009 at 2:23 PM, George George <george.githinji@gmail.com> w=
George George wrote:
On Thu, Oct 1, 2009 at 2:21 PM, Ryan Davis <ryand-ruby@zenspider.com> wrote:
[#347515] Problems with SNMP — Rocir Santiago <rocirleite@...>
Hello!
Rocir, you should first check if your switch supports this functionality. I=
Hi, Nicol叩s.
2009/10/1 Rocir Santiago <rocirleite@gmail.com>
When I just add the ifPhysAddress, the application just exists, with out
[#347540] Newbie: Does Ruby have event driven network libraries? — Wyatt Biker <wyattbiker@...>
I made a turn based game and would like to make a back end engine
[#347564] Suggest a game development tool? — Tim Mcd <tmcdowell@...>
I'd like to make a 2D RPG in the style of FF5 and it's ilk. What tool do
[#347579] socket error handling... Net http — Bigmac Turdsplash <i8igmac@...>
loop {
[#347611] Rolling String Buffer needed — Matt Brooks <mattbrooks@...>
I have constant ascii data streaming in, each message terminated with
[#347612] Having a gem for 1.8 and 1.9 — "(RK) Sentinel" <sentinel.2001@...>
This is a simple query ... I am back after a long hiatus so have
[#347639] Ncurses run time error with ruby 1.9.1 — "(RK) Sentinel" <sentinel.2001@...>
I've just installed ruby 1.9.1 (port install). I gem installed ncurses,
[#347643] Writing a Mad Libs program? — Britt Hayes <brittghayes@...>
On Oct 3, 2009, at 9:39 AM, Britt Hayes wrote:
[#347650] On Ranges as conditions — Rafael Cunha de Almeida <none@...>
Reading a few tutorials I found this piece of code:
[#347664] ruby 1.9: handling meta and control keys — "(rkumar) Sentinel" <sentinel.2001@...>
1.8 used to return an int for say ?\M-a or ?C-a (when user types meta-a
[#347682] How to use transactions in DataMapper? — Bjoern <bjoerngt@...>
Hello,
[#347686] what do you enjoy in a ruby quiz? — Martin DeMello <martindemello@...>
I've noticed that the ruby quiz has been getting few responses of
Here is an artificial intelligence problem waiting for an algorithm. Would
[#347700] Count the number of times an element occurs in an array — Jim Burgess <jack.zelig@...>
Hi,
Hi --
[#347715] regex simplifier? — Roger Pack <rogerpack2005@...>
Question.
2009/10/5 Roger Pack <rogerpack2005@gmail.com>:
> I tried to cook something up in the past. You can find it when
> %r{(?<re>#{float})#{whitespace}(?<op>[+-])#{whitespace}(?<im>#{float})i}
[#347717] method_missing for command shell? — Roger Pack <rogerpack2005@...>
Hi all. My bash-fu is a little bit lacking, so here's my question.
Try zsh
[#347749] Vendored Oniguruma gem MissingSourceFile oregexp — Matthew Forrest <matthattan@...>
Hi All,
[#347753] BigDecimal to float error — Sam Kong <sam.s.kong@...>
Hi,
[#347765] Ruby for the wrong reason — flebber <flebber.crue@...>
Hi
flebber wrote:
Sounds like what I had trouble with (regarding Python) hated the indentatio=
flebber wrote:
On Oct 6, 2009, at 1:16 AM, 7stud -- wrote:
James Edward Gray II wrote:
On Oct 6, 2009, at 1:33 PM, 7stud -- wrote:
James Edward Gray II wrote:
On Oct 6, 2009, at 1:59 PM, 7stud -- wrote:
2009/10/6 James Edward Gray II <james@graysoftinc.com>:
[#347766] Rainbows! 0.1.1 - with Ruby 1.8 support! — Eric Wong <normalperson@...>
Rainbows! Unicorn for slow apps and slow clients
[#347777] Creating lots of folders on ftp server — Raimon Fs <coder@...>
Hello,
[#347785] new line in string — Sharanya Suresh <sharankruthi@...>
Hi,
[#347812] How to do explicit copy — rickyr <rickyrm978@...>
Hi,
[#347816] call Ruby file from HTML — Yousef Jawwad <javaonly@...>
hi everybody
[#347829] Creating a pacifier in command line program — Jerry Mr <jerry.piazza@...>
I am trying to create a program that, at one part, replaces already
[#347830] How to not display output of a system call. — Jerry Mr <jerry.piazza@...>
Lets say I have a Windows command line program that runs the following:
Jerry Mr wrote:
[#347862] Does Ruby have a 'which' like method — Scott G Smith <scottxsmith89@...>
Most UNIX shells have a which command.
[#347871] Google Wave- I need contacts! — Tim Mcd <tmcdowell@...>
After 6 days, i finally got my gWave invite! ('and there was much
Well, you could share the love (I'd love an invite) and build contacts
Andrew Timberlake wrote:
Tim, when they restrict the rules you could ping this group for an
Rajinder Yadav wrote:
i'd like an invite if you have a spare
Jarod Reid wrote:
Uhh, didn't hear of google wave before.
> Uhh, didn't hear of google wave before.
lith wrote:
Aldric Giacomoni wrote:
Aldric Giacomoni wrote:
On Wednesday 11 November 2009 08:53:37 am Anthony Metcalf wrote:
Add me ! ( eregontp@gmail.com )
I'm in.
[#347881] Why I can not use my own blocks in 1.9? — Ivan Samonov <hronya@...>
Example:
[#347886] unicorn 0.93.2 - more compatible with Rails — Eric Wong <normalperson@...>
Unicorn is a HTTP server for Rack applications designed to take
[#347887] lunix split with ruby — Ahmet Kilic <ahmedkilic@...>
I am using cygwin on windows.
On Wed, Oct 7, 2009 at 6:19 AM, Ahmet Kilic <ahmedkilic@gmail.com> wrote:
unknown wrote:
On Wed, Oct 7, 2009 at 11:25 AM, Ahmet Kilic <ahmedkilic@gmail.com> wrote:
[#347893] Ruby web programming — Yousef Jawwad <javaonly@...>
I am asking for , how I can call Ruby from html
[#347896] Ruby Marshal unexpected results — Aaron Vegh <aaron@...>
Hi there,
[#347900] Wx::Choice Items generated from lookup table, later need id's of choices. — Anthony Metcalf <anthony.metcalf@...>
Hi,
[#347931] Detect any "<a href=mailto:...>...</a>" string in a string? — Joshua Muheim <forum@...>
Hi all
[#347934] split question — Li Chen <chen_li3@...>
Hi all,
[#347970] Poll on Eval in Ruby. — Kazimir Majorinc <email@...>
I am Lisp programmer and I write an article on
[#347981] Mixing instance_eval and block with arguments — Robert Klemme <shortcutter@...>
Hi,
[#347986] Difficulty updating Ruby Gems in a non-standard location — David Brodbeck <brodbd@...>
I have Ruby Gems installed in a non-standard location. Both
On Oct 8, 2009, at 10:53 AM, David Brodbeck wrote:
[#347991] write a file — Li Chen <chen_li3@...>
Hi all,
[#347992] find a print out a line — Collin Moore <collin.moore@...>
Hi
[#348006] Green Threads - I want them to thrash... — Matt Brooks <mattbrooks@...>
All Day I have tried to accomplish the following using threads, and just
[#348009] String of Parameters used as parameter list — James Somers <jemburula@...>
Hi there,
[#348025] Making one reg ex out of two — Jim Burgess <jack.zelig@...>
I have a string:
[#348028] better looking directory chooser for tk? — Roger Pack <rogerpack2005@...>
Currently in windows with Tk
[#348041] File.addmod? — Roger Pack <rogerpack2005@...>
I'm familiar with
[#348042] Windows Ruby Version Check — James Edward Gray II <james@...>
Can a Windows Ruby user please confirm that the "Ruby 1.9.1-p129
On Oct 9, 2009, at 1:01 PM, James Edward Gray II wrote:
[#348061] Scope of constants in instance_eval — Peter Pk <peterk@...>
[#348064] Ruby Challenge for Beginners #2 — Satish Talim <satish.talim@...>
The second installment of the Ruby Programming Challenge for Newbies
[#348066] Numbers game - multiple guesses? — John Kriple <thefiend@...>
I'm trying to figure out how to get a user to be able to submit guesses
[#348091] Can't use variable from cgi with hpricot — Wiley Davis <wileydavis@...>
I'm trying to get a url from a form and return the page title of said
[#348092] Trouble with local variables — Severin Newsom <severin.newsom@...>
Hello everyone!
[#348100] Class Level inheritable attributes - are we there yet? — dreamcat four <dreamcat4@...>
Hi,
Hi --
The problem with class variables in Ruby, is that a class variable is
On 10/10/2009 08:59 PM, dreamcat four wrote:
On Sun, Oct 11, 2009 at 6:55 PM, Robert Klemme
On Tue, 13 Oct 2009, ara.t.howard wrote:
On Mon, Oct 12, 2009 at 17:48, David A. Black <dblack@rubypal.com> wrote:
2009/10/13 ara.t.howard <ara.t.howard@gmail.com>:
Hi,
[#348125] When use self.method_name and when only method_name? — Joshua Muheim <forum@...>
Hi all
[#348131] Tip du jour: no need to chomp before to_i — "David A. Black" <dblack@...>
Hi --
[#348138] newbie problem with Ruby — Alex Gd <quixoptic@...>
Hi there,
On Sun, Oct 11, 2009 at 11:03 PM, Alex Gd <quixoptic@gmail.com> wrote:
[#348146] ruby beginner — John Embree <johnembree2000@...>
hi guys reading here seems like everyone is a whole lot smarter at this
[#348163] Spliting hash using map! — Ne Scripter <stuart.clarke@...>
Hello,
[#348169] Does ruby.h overrides C "enum"? — Iñaki Baz Castillo <ibc@...>
Hi, writting a Ruby C extension (for 1.8 or 1.9) I get an error when using=
Iñaki Baz Castillo wrote:
El Lunes, 12 de Octubre de 2009, I=C3=B1aki Baz Castillo escribi=C3=B3:
Hi,
[#348187] Subclassing in module from top module? — Vít Ondruch <v.ondruch@...>
Hello everybody,
[#348188] Any "easy" example of using T_HASH in a C extension? — Iñaki Baz Castillo <ibc@...>
Hi, I've found some tutorials explaining how to create and manipulat a Ruby=
[#348210] remove specific text from line — Collin Moore <collin.moore@...>
Hi
[#348218] Ruby trunk — Jonas Schneider <js.sokrates@...>
Hey guys,
[#348221] manually sort array of numbers — Jason Lillywhite <jason.lillywhite@...>
for the sake of learning, I built a sort method to sort an array of
[#348222] Need Help with this problem — Ghost Alpha <ghosttilt@...>
I am in this programming class and need help on this problem:
[#348229] Enumerating and mixin. — Rajinder Yadav <devguy.ca@...>
I am trying to learn the correct way to enumerate in Ruby, a few things are
Rajinder Yadav wrote:
[#348237] How to call an foreign program(compiled) from ruby? — Harry <blogdriver@...>
Hi, I am trying to use some bin(like exe files under windows) file
[#348260] Rice installation issue. — George Thomas <george.thomas@...>
I have rice gem (rice-1.1.0.gem) downloaded to my folder C:\Ruby19
[#348281] how to solve a special JRuby and Java syntax conflict? — "Axel Etzold" <AEtzold@...>
Dear all,
On Tue, Oct 13, 2009 at 8:52 PM, Axel Etzold <AEtzold@gmx.de> wrote:
On Tue, Oct 13, 2009 at 9:52 PM, Paul Smith <paul@pollyandpaul.co.uk> wrote:
Dear Paul,
Axel Etzold wrote:
[#348291] no Enumerator#[] ? — Roger Pack <rogerpack2005@...>
Currently
[#348293] Ruby Ripper less Ruby 1.9 — Intransition <transfire@...>
Can't seem to find much on this. The last post I could find dated back
[#348309] Something portable for development purposes — Aldric Giacomoni <aldric@...>
Alright.. I'm going to buy something to develop with, and use as a
On 14 Oct 2009, at 05:00, Aldric Giacomoni wrote:
Eleanor McHugh wrote:
On 19 Oct 2009, at 18:35, Aldric Giacomoni wrote:
[#348316] How to resume execution of a FOR loop after timeout error — Stephen Lead <stephen.lead@...>
Hi everyone,
[#348317] deep cloning, how? — Rajinder Yadav <devguy.ca@...>
I am trying to figure out how to perform a deep clone
2009/10/14 Rajinder Yadav <devguy.ca@gmail.com>:
On 10/14/09, Robert Klemme <shortcutter@googlemail.com> wrote:
On 14.10.2009 19:03, Caleb Clausen wrote:
On 10/14/09, Robert Klemme <shortcutter@googlemail.com> wrote:
Caleb Clausen wrote:0
> But I think the spirit of dup
2009/10/16 lith <minilith@gmail.com>:
Robert Klemme wrote:
On 10/19/2009 10:32 AM, Brian Candler wrote:
[#348334] converting object into array — Suresh Napster <surinapster@...>
hi guys,
At 2009-10-14 07:52AM, "Paul Smith" wrote:
[#348339] Hey you! Stop using relative requires! — Intransition <transfire@...>
I recently came across two different programs that had this line in a
On Wed, Oct 14, 2009 at 6:01 AM, Intransition <transfire@gmail.com> wrote:
On Oct 18, 2009, at 4:36 PM, Intransition wrote:
James Edward Gray II wrote:
On Oct 19, 2009, at 4:30 PM, Thomas Sawyer wrote:
Intransition wrote:
[#348342] NANWSI: Not Another .NET Web Service Issue — Massimo Bensi <mbensi@...>
Hi all,
I guess nobody has the answer to this, hence nobody was able to make
On Fri, Oct 16, 2009 at 5:55 AM, Massimo Bensi <mbensi@spotzer.com> wrote:
[#348350] Ruby sql question — Manish Sharma <manish16s@...>
Hi,
[#348362] Problems With Fibers in Threads — Chris Wailes <chris.wailes@...>
I know it's an odd combination, but I have a situation where a thread
Are you trying to reschedule a fiber from a different thread? Afaik that
Tony Arcieri wrote:
OK, that does appear to be the problem as the Fibers are created in
On Wed, Oct 14, 2009 at 12:13 PM, Chris Wailes <chris.wailes@gmail.com> wro=
[#348397] dynamically access class constants? — Marli Ba <marli03@...>
I've been looking for a method similar to:
[#348401] matching against a zillion patterns — George George <george.githinji@...>
i have some script in which i would like to match a string against
George George wrote:
2009/10/15 steve <zyzygy@telstra.com>:
2009/10/15 George George <george.githinji@gmail.com>:
[#348419] parseexcel, how to select a worksheet using the name — Mario Ruiz <tcblues@...>
Hi,
On Thu, Oct 15, 2009 at 07:53, Mario Ruiz <tcblues@gmail.com> wrote:
That was the first thing I tried...
Any help???
[#348436] zena 0.15.0 gem release — Gaspard Bucher <gaspard@...>
First public release for zena, the CMS with super natural powers !
[#348486] Dynamic nested each in ruby 1.8.7? — Toi Toi <toi@...>
How can one have a function that uses a dynamic amount of each
Wow,
Florian Gilcher wrote:
On Sun, Oct 18, 2009 at 11:43 AM, Toi Toi <toi@mailinator.com> wrote:
That function does not give the correct output for larger arrays. The
[#348489] Need help comparing Array data — Matt Beckley <greenlizards@...>
Trying to write code for rock paper scissors game and read in two values
[#348521] Next steps in Ruby? — Aldric Giacomoni <aldric@...>
Hi everyone,
[#348525] ruby 1.8.6, threadpooling and blocking sockets - advice/help — Daniel Bush <dlb.id.au@...>
Hi,
On 10/19/2009 02:51 PM, Daniel Bush wrote:
Robert Klemme wrote:
On 20.10.2009 02:31, Daniel Bush wrote:
[#348529] Ruby & Watir -> test C# desktop app — Denis Gorban <dgorban@...>
Hi,
[#348545] Certificate hashes using Base64, DER, ASN.1, PkiPath... — Daniel Danopia <danopia@...>
I'm trying to write a server for a communications system
I know how to hash, I said it's the hard part because I don't know how
[#348551] Threads terminating — pawel <pjastrz@...>
Why this simple program give no output, and terminates immidiatly
[#348557] Install Error: No space left on device - write (Errno::ENOSP — Kurtis Rainbolt-greene <thinkwritemute@...>
Trying to install Ruby on my Ubuntu parition. I untared, ./configure'd,
On Mon, Oct 19, 2009 at 3:55 PM, Kurtis Rainbolt-greene
Hassan Schroeder wrote:
[#348570] memory leak — Rob Doug <broken.m@...>
Hi all,
On 20.10.2009 03:10, Rob Doug wrote:
On 21.10.2009 00:47, Rob Doug wrote:
> You could print out object statistics to get an idea about the source of
On 10/22/2009 04:52 AM, Rob Doug wrote:
[#348580] can 35.times do |i| be decrement of "i" ? — Jian Lin <blueskybreeze@...>
if there is a loop
Jian Lin wrote:
Rajinder Yadav wrote:
[#348600] recursive function problem — Maurizio De santis <desantis.maurizio@...>
Hi all!
[#348605] instance_eval with method proc — Paul Carey <paul.p.carey@...>
Hi
[#348611] Mutex confusion — Alex Young <alex@...>
I'm a little confused by Mutex's behaviour. It doesn't seem right that a
[#348615] Randomly generated words from a set of letters — MR-Mencel@...
Hi,
[#348618] Complex GSUB query — Ne Scripter <stuart.clarke@...>
Hello all,
[#348629] Please Review My First Ruby Program — Simeon Willbanks <simeon@...>
I've written a simple program to simulate a Soccer game. Its the first
[#348643] `make check' hangs, when the source directory is read-only — "Міхаіл Т." <mi+ruby-forum@...>
Hello!
[#348693] no route matches ' — Mc Ieong <mcieong@...>
HI, I AM A NEWBIE IN RUBY, I WANT TO USE THE JAVASCRIPT, SO I ADD THIS
[#348707] merging partial, incomplete data files — Benjamin Thomas <benjamin.thomas81@...>
Hello all,
[#348727] Creating and raising custom exception in Ruby C extension — Iñaki Baz Castillo <ibc@...>
Hi, I'm trying to create a CustomError exception in a Ruby C extension and =
El Jueves, 22 de Octubre de 2009, I=C3=B1aki Baz Castillo escribi=C3=B3:
On Thu, Oct 22, 2009 at 3:55 PM, I=C3=B1aki Baz Castillo <ibc@aliax.net> wr=
[#348735] ruby-1.9, sqlite3 and qt4 on windows — Martin DeMello <martindemello@...>
I'm thinking of developing an app with ruby 1.9, sqlite3 and qt4 which
Martin DeMello wrote:
Yes, i'm definitely using an orm :) Debating the relative merits of
[#348738] convert/replace a value of nil with 0? — Mmcolli00 Mom <mmc_collins@...>
Do you know how I can convert or replace any value that gets back a
On Thu, Oct 22, 2009 at 5:24 PM, Mmcolli00 Mom <mmc_collins@yahoo.com> wrote:
2009/10/22 Jes=FAs Gabriel y Gal=E1n <jgabrielygalan@gmail.com>:
[#348747] Using SHA1 Digested Passwords for SSH connection — Joe Martin <joseph.w.martin.ctr@...>
Hello all.
[#348757] Good term for "super-project" — Intransition <transfire@...>
Rather a minor thing, but it's been on my TODO list for too long.
[#348774] Tiamat: Automatic parallelism across multiple machines — "James M. Lawrence" <quixoticsycophant@...>
= Tiamat
On Thu, Oct 22, 2009 at 11:42 PM, James M. Lawrence
[#348781] Setting attribute via send in Ruby 1.8.6 — Charles Calvert <cbciv@...>
Using Ruby 1.8.6.
On Fri, 23 Oct 2009 17:18:22 +0200, Robert Klemme
[#348799] C extension: "malloc" and "rb_raise" — Iñaki Baz Castillo <ibc@...>
Hi, if I use "malloc" in a Ruby C function and then call to "rb_raise" (so =
Hi,
El S=E1bado, 24 de Octubre de 2009, Yukihiro Matsumoto escribi=F3:
Hi,
[#348807] can you implement a better IO#each_lines? — Haoqi Haoqi <axgle@126.com>
like this,thanks
[#348819] Enumerable ObjectSpace (#222) — Daniel Moore <yahivin@...>
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
On Saturday 24 October 2009, Daniel Moore wrote:
[#348820] VM help — Alexander Cohen <naftaly@...>
Hello,
[#348825] mail — Mikel Lindsaar <raasdnil@...>
Some of you might know about a little gem that Minero Aoki wrote called tmail.
On Oct 24, 2009, at 9:38 PM, Mikel Lindsaar wrote:
[#348826] using .delete_if and reject on elements in an array — Matt Beckley <greenlizards@...>
Working on code to fill an array with 200 random integer elements. The
[#348831] erb:how to make less % ? — Haoqi Haoqi <axgle@126.com>
demo.html.erb
[#348846] BareTest 0.2 released — apeiros@...
I'm pleased to announce BareTest 0.2.
Stefan Rusterholz wrote:
[#348859] Using id2ref for anything? — Charles Oliver Nutter <headius@...>
ObjectSpace._id2ref is another of those peculiar methods, an artifact
[#348867] file open failure test — Derek Smith <derekbellnersmith@...>
Hi All,
On Monday 26 October 2009, Derek Smith wrote:
2009/10/26 Stefano Crocco <stefano.crocco@alice.it>:
Hi,
Bertram Scharpf wrote:
[#348877] Array#collect in a method call, not working for me — Michael Randall <randallsata@...>
I am sure I'm making a newbie mistake, as I've just started learning
2009/10/26 Michael Randall <randallsata@gmail.com>:
OK, I *thought* that part was working, but now I see that it wasn't
[#348884] Try to copy text between two know string — Ahmad Azizan <ahmad.azizan@...>
Hello,
On Mon, Oct 26, 2009 at 8:33 AM, Ahmad Azizan <ahmad.azizan@gmail.com> wrot=
[#348891] Array Number of Leaves — salai <sayakyi@...>
Dear Rubyist,
[#348899] Hash Reverse ? — salai <sayakyi@...>
I am preparing for my orals exam in Ruby (my last chance.. , If I fail
[#348911] Setting instance variables from hash parameters (with defaults) — Leslie Viljoen <leslieviljoen@...>
Hi!
I see this is a shorter way:
[#348939] RCR: regex + regex — Roger Pack <rogerpack2005@...>
Feedback on the following suggestion for ruby:
[#348940] frubygems -- quicker loading rubygems:"spooky" version — Roger Pack <rogerpack2005@...>
Please to announce release code-named "spooky" of fast rubygems.
[#348944] RSpec swallowing huge chunks of my backtraces — Tony Arcieri <tony@...>
I don't know exactly when this started happening, but it seems like RSpec
On Mon, Oct 26, 2009 at 7:37 PM, Tony Arcieri <tony@medioh.com> wrote:
[#348946] array question — Ruby Mokx <rubymokx@...>
Hey everyone I'm a 14 year-old beginner in ruby and I discovered that I
[#348968] SQL Shell for MS Access — Paul Smith <paul@...>
What I want is an SQL command prompt allowing me to run SQL queries
Paul Smith wrote:
2009/10/27 Paul Smith <paul@pollyandpaul.co.uk>:
[#348977] watir or selenium — Erika <geagneske83@...>
Hi,
[#348994] miniruby — Richard Lee <wing2@...>
Is miniruby needed to install ruby for Unix? If so, where can I find
[#348999] Net LDAP problem (no attrs or get_attributes methods) — Glen Holcomb <damnbigman@...>
So I am having difficulty getting the attributes for an LDAP entry. If I
ldap.search(base, scope, filter, attrs) { |entry|
Nope, same error. I passed "*" to the attrs argument.
Glen Holcomb wrote:
[#349004] duby 0.0.1 Released — Charles Oliver Nutter <headius@...>
duby version 0.0.1 has been released!
On Tue, Oct 27, 2009 at 5:13 PM, Bill Kelly <billk@cts.com> wrote:
[#349022] Closures / lambda question — Aldric Giacomoni <aldric@...>
This is something I don't understand, and did not understand when I
Aldric Giacomoni wrote:
Marnen Laibow-Koser wrote:
Aldric Giacomoni wrote:
Marnen Laibow-Koser wrote:
[#349023] Hey I need help with my code. — Brian Geds <uforacer@...>
Hello guys I am doing a little something for class but I need help
You need a break in your loop. Also the conditional syntax is wrong
[#349024] Desktop GUI apps in Ruby — Marnen Laibow-Koser <marnen@...>
Hi folks!
Marnen Laibow-Koser wrote:
On Wed, Oct 28, 2009 at 9:03 AM, Marnen Laibow-Koser <marnen@marnen.org> wr=
Marnen Laibow-Koser wrote:
[#349045] Is it possible to do multiple regex in one operation? — Ahmad Azizan <ahmad.azizan@...>
Hello,
[#349050] Help With Homework Code — Rick Barrett <chngth3wrld@...>
Another user posted a question about a dice game earlier. I have this
Rick Barrett wrote:
Thank you Candlerb.
In this bit
Max Williams wrote:
I'm not sure I understand what you're saying. I tried the "if"
[#349058] Test your ruby skill — Raveendran Perumalsamy <jazzezravi@...>
Hi,
On Wed, Oct 28, 2009 at 6:23 AM, Raveendran Perumalsamy
Hi Rajinder,
Raveendran Perumalsamy wrote:
Hi Rajinder,
[#349070] Regexp: rubular VS match. Why is the result different ? — Ale Ds <alexdesi@...>
I have to capture by means of regexp the content between '<' and '>'
[#349099] Ruby can't subtract ? — Aldric Giacomoni <aldric@...>
I found this blog entry:
On Thu, 29 Oct 2009, Aldric Giacomoni wrote:
Matthew K. Williams wrote:
On Thu, 29 Oct 2009, Aldric Giacomoni wrote:
On 28.10.2009 19:21, Matthew K. Williams wrote:
Robert Klemme wrote:
Aldric Giacomoni wrote:
[#349113] Uninitialized Constant — Josh Stevenson <jstevenson@...>
I am sure that there is going to be info I leave out that you will need,
Josh Stevenson wrote:
> Looks like you're in a Rails application. Where does convert.rb live?
Josh Stevenson wrote:
> OK, so these scripts are not part of the Rails app, and the rails
[#349124] String Matching Problem — Matt Brooks <mattbrooks@...>
I need a way to accomplish the following. I can't figure out an elegant
Matt Brooks wrote:
I appreciate everyone's input, It seems like they should all work, and
2009/10/29 Matt Brooks <mattbrooks@gatech.edu>:
[#349140] Ruby in Australia... — Hal Fulton <rubyhacker@...>
Hi, all...
[#349141] Having issues with exception — Kyle Johnson <kylearippee@...>
Hi, I have been having a bit of an issue. I am trying to create a
Your problem is that you're catching the exception outside of the loop. Try
Judson Lester wrote:
Marnen Laibow-Koser wrote:
[#349159] What us binding objects — Nike Mike <thillaibooks@...>
What is the usage of binding objects
[#349183] Using multicore CPUs in parallel tasks — Marc Hoeppner <marc.hoeppner@...>
Hi,
On Thu, Oct 29, 2009 at 8:56 AM, Marc Hoeppner
On Thu, Oct 29, 2009 at 11:48 AM, Glen Holcomb <damnbigman@gmail.com> wrote:
On 10/29/2009 09:04 PM, Tony Arcieri wrote:
Tony Arcieri wrote:
[#349199] Problem with compiling Ruby-1.9.1-p243 — Richard Lee <wing2@...>
Hi...I am having problem to compile Ruby-1.9.1-p243 on AIX 5.3. Can
[#349207] Why (1..4).inject(&:+) works ? — Benoit Daloze <eregontp@...>
Hi rubyists,
Hi,
[#349216] #system() hangs, child is defunct — Tor Erik Linnerud <tel@...>
Hi all,
[#349230] I can not load rubygems onto ruby using linux — Melvin Clarkson <mpclarkson@...>
Hi,
[#349253] Ruby doesn't implement x++ for Fixnum's because ??? — RichardOnRails <RichardDummyMailbox58407@...>
Hi,
On Oct 29, 9:18=A0pm, RichardOnRails
2009/10/30 RichardOnRails <RichardDummyMailbox58407@uscomputergurus.com>:
> IMHO the story goes like this: absence of postfix ++ and -- is a
On Fri, Oct 30, 2009 at 11:05 AM, Robert Klemme
On Fri, Oct 30, 2009 at 12:03 PM, Rick DeNatale <rick.denatale@gmail.com>wrote:
Tony Arcieri wrote:
On Tue, Nov 3, 2009 at 10:30 PM, Michael W. Ryder <_mwryder55@gmail.com>wrote:
Of course I had to jump in here.
On Wed, Nov 4, 2009 at 1:58 AM, Charles Oliver Nutter
Rick Denatale wrote:
Hi,
On Nov 4, 10:59=A0am, Yukihiro Matsumoto <m...@ruby-lang.org> wrote:
On Nov 5, 4:11=A0am, Tony Arcieri <t...@medioh.com> wrote:
On Nov 4, 5:58=A0pm, Charles Oliver Nutter <head...@headius.com> wrote:
On Wed, Nov 4, 2009 at 3:55 AM, Gavin Sinclair <gsinclair@gmail.com> wrote:
On Wed, Nov 4, 2009 at 10:41 PM, Tony Arcieri <tony@medioh.com> wrote:
On Wed, Nov 4, 2009 at 10:23 AM, Martin DeMello <martindemello@gmail.com>wrote:
> -----Original Message-----
Walton Hoops wrote:
Michael W. Ryder wrote:
On Wed, Nov 4, 2009 at 1:46 PM, Marnen Laibow-Koser <marnen@marnen.org>wrote:
Tony Arcieri wrote:
> -----Original Message-----
Walton Hoops wrote:
Michael W. Ryder wrote:
> -----Original Message-----
Walton Hoops wrote:
Michael W. Ryder wrote:
On 2009-11-06, David A. Black <dblack@rubypal.com> wrote:
On Fri, Nov 6, 2009 at 4:30 PM, Seebs <usenet-nospam@seebs.net> wrote:
On Sun, Nov 8, 2009 at 11:48 AM, Tony Arcieri <tony@medioh.com> wrote:
On Sun, Nov 8, 2009 at 10:45 AM, Rick DeNatale <rick.denatale@gmail.com>wrote:
Tony Arcieri wrote:
On Sun, Nov 8, 2009 at 11:22 AM, Marnen Laibow-Koser <marnen@marnen.org>wrote:
> -----Original Message-----
On Sun, Nov 8, 2009 at 11:49 AM, Walton Hoops <walton@vyper.hopto.org>wrote:
> From: bascule@gmail.com [mailto:bascule@gmail.com] On Behalf Of Tony
On Sun, Nov 8, 2009 at 1:15 PM, Walton Hoops <walton@vyper.hopto.org> wrote:
Gaah, close this thread! ;)
On Sun, Nov 8, 2009 at 2:30 PM, Florian A=DFmann <florian.assmann@email.de>=
Tony Arcieri wrote:
On Sun, Nov 8, 2009 at 3:49 PM, Marnen Laibow-Koser <marnen@marnen.org>wrote:
On 2009-11-08, Tony Arcieri <tony@medioh.com> wrote:
On Nov 8, 12:37=A0pm, Tony Arcieri <t...@medioh.com> wrote:
On Nov 9, 9:44=A0am, Tony Arcieri <t...@medioh.com> wrote:
On Sun, Nov 8, 2009 at 8:50 PM, Gavin Sinclair <gsinclair@gmail.com> wrote:
Tony Arcieri wrote:
On Sun, Nov 8, 2009 at 9:54 PM, Joel VanderWerf <vjoel@path.berkeley.edu>wrote:
Tony Arcieri wrote:
Marnen Laibow-Koser wrote:
On 2009-11-09, Marnen Laibow-Koser <marnen@marnen.org> wrote:
On Mon, Nov 9, 2009 at 8:40 AM, Seebs <usenet-nospam@seebs.net> wrote:
Rick Denatale wrote:
Marnen Laibow-Koser wrote:
Aldric Giacomoni wrote:
Marnen Laibow-Koser wrote:
On Mon, Nov 9, 2009 at 11:14 AM, Aldric Giacomoni <aldric@trevoke.net> wrot=
Rick Denatale wrote:
Just so you know I wasn't dissing La langue belle. I try to maintain
Tony Arcieri <tony@medioh.com> writes:
On 2009-11-09, Tony Arcieri <tony@medioh.com> wrote:
Seebs wrote:
On Nov 20, 2:48=A0am, Aldric Giacomoni <ald...@trevoke.net> wrote:
[#349256] Ruby style question (many-arg methods) — Nick Green <cruzmail.ngreen@...>
If you are calling a method that takes a lot of arguments and starts a
[#349264] How do you get the tail end of a string? — "Just Another Victim of the Ambient Morality" <ihatespam@...>
I'm actually hoping this is an embarrassing question but how do you get
Just Another Victim of the Ambient Morality wrote:
Michael W. Ryder wrote:
Hi,
Bertram Scharpf wrote:
Hi,
Bertram Scharpf wrote:
Hi,
[#349275] Interesting GC.start — Haoqi Haoqi <axgle@126.com>
irb:
[#349276] String#split and capturing delimiters — Albert Schlef <albertschlef@...>
Since what version of Ruby does "String#split /(whatever)/" returns the
[#349283] Ruby Challenge for Beginners #3 - Short Circuit — Satish Talim <satish.talim@...>
Ruby beginners: The third installment of the Ruby Programming Challenge for
On Fri, Oct 30, 2009 at 10:52 AM, Satish Talim <satish.talim@gmail.com> wrote:
[#349289] HTTPClient problem with SSL and ruby 1.8.7 — Philippe Philos <plucas@...>
[#349317] two stage array sorting — Tim Ferrell <s0nspark@...>
[#349323] Merging hashes using both symbols and strings as keys — shenry <stuarthenry@...>
I'm trying to merge to hashes, one using symbols as keys (the defined
On Fri, Oct 30, 2009 at 11:10 AM, shenry <stuarthenry@gmail.com> wrote:
2009/11/3 Josh Cheek <josh.cheek@gmail.com>:
On Tue, Nov 3, 2009 at 7:06 AM, Robert Klemme <shortcutter@googlemail.com>wrote:
On Tue, Nov 3, 2009 at 1:22 PM, Josh Cheek <josh.cheek@gmail.com> wrote:
On Tue, Nov 3, 2009 at 7:27 AM, Paul Smith <paul@pollyandpaul.co.uk> wrote:
On Tue, Nov 3, 2009 at 8:40 AM, Josh Cheek <josh.cheek@gmail.com> wrote:
[#349352] In-place parameter modification — Dave Anderson <anderson@...>
Native to ruby are several methods that change passed-in parameters
Actually, chomp!(string) doesn't modify string, it modifies $_ (which, if I
Judson Lester wrote:
On Sat, Oct 31, 2009 at 5:03 AM, 7stud -- <bbxx789_05ss@yahoo.com> wrote:
Hello,
On Oct 31, 2009, at 12:44 PM, Robert Gleeson wrote:
[#349354] mtime.max — Derek Smith <derekbellnersmith@...>
Hi All,
[#349367] Really small numbers in ruby coming as zero!? — Mahadev Ittina <mittina@...>
hello I have this piece of code written to analyse the cross section and
[#349369] compile architecture-specific, portable ruby — "Sean O'Donnell" <s3an.odonn3ll@...>
Hello,
[#349390] how can i perform a one line case statement on a number — Braxton Beyer <rubyforum@...>
I want to be able to do something like this:
Braxton Beyer wrote:
[#349406] Hamurabi (#223) — Daniel Moore <yahivin@...>
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
On Oct 31, 2009, at 6:23 PM, Daniel Moore wrote:
On Mon, Nov 2, 2009 at 5:29 AM, James Edward Gray II
BASIC wasn't that bad...
"8k MICROSOFT BASIC", apparently :) It's the one here:
Wow this looks old, almost like GWBasic.
Sorry I'm new to the list. Is it ok to post solutions at this point
On Nov 2, 2009, at 6:37 PM, genericpenguin wrote:
On Mon, Nov 2, 2009 at 10:25 AM, Ehsanul Hoque <ehsanul_g3@hotmail.com> wro=
Please Review My First Ruby Program
I've written a simple program to simulate a Soccer game. Its the first
full program I've written in Ruby, so please forgive any obvious
mistakes. :) In advance, thanks for your comments. It requires Ruby
1.9. Please run the unit tests to see the program in action.
Simeon
$ ruby TestSoccerGame.rb
---
### TestSoccerGame.rb
require "SoccerGame"
require "test/unit"
class TestSoccerGame < Test::Unit::TestCase
# M辿s que un club
FC_BARCELONA = {
'club' => 'FC Barcelona',
'players' => [
[1, 'Victor Valdes Arribas', :keeper],
[20, 'Daniel Alves da Silva', :defender],
[3, 'Gerard Pique Bernabeu', :defender],
[4, 'Rafael Marquez Alvarez', :defender],
[5, 'Carles Puyol Saforcada', :defender],
[6, 'Xavier Hernandez Creus', :midfielder],
[8, 'Andres Iniesta Lujan', :midfielder],
[15, 'Seydou Keita', :midfielder],
[9, 'Zlatan Ibrahimovic', :striker],
[10, 'Lionel Andres Messi', :striker],
[14, 'Thierry Henry', :striker]
]
}
# You'll Never Walk Alone
LIVERPOOL_FC = {
'club' => 'Liverpool FC',
'players' => [
[25, 'Pepe Reina', :keeper],
[2, 'Glen Johnson', :defender],
[23, 'Jamie Carragher', :defender],
[37, 'Martin Skrtel', :defender],
[22, 'Emiliano Insua', :defender],
[20, 'Javier Mascherano',:midfielder],
[8, 'Steven Gerrard', :midfielder],
[11, 'Albert Riera', :midfielder],
[15, 'Yossi Benayoun', :midfielder],
[9, 'Fernando Torres', :striker],
[18, 'Dirk Kuyt', :striker]
]
}
def setup
if RUBY_VERSION.to_f < 1.9
flunk("SoccerGame requires Ruby 1.9 or greater")
end
# @g used for all tests except full game test
@g = SoccerGame.new FC_BARCELONA, LIVERPOOL_FC
end
# Full game test
def test_champions_league_final
@f = SoccerGame.new FC_BARCELONA, LIVERPOOL_FC
@f.title = "UEFA Champions League Final"
# Starting lineups
assert @f.home
assert @f.away
assert_equal 11, @f.home.players.length
assert_equal 11, @f.away.players.length
# Kickoff
assert @f.events(:first_half_kickoff)
assert @f.first_half
assert_equal false, @f.second_half
# Show Alves yellow
assert_block "Dani Alves" do
@f.yellow_card(:home, 20)
end
assert_equal 1, @f.yellow_cards[:home].length
# El Nino sneaks one in
@f.goal(:away, 9)
assert_equal 1, @f.score[:away]
assert_equal 1, @f.goals[:away][9]
# Halftime
assert @f.events(:half_time)
assert_equal false, @f.first_half
assert_equal false, @f.second_half
# Start second half
assert @f.events(:second_half_kickoff)
assert @f.second_half
assert_equal false, @f.first_half
# Show Skrtel red
away_team_length = @f.away.players.length
assert_block "Skrtel wasn't sent to the showers" do
@f.red_card(:away, 37)
end
assert_equal away_team_length-1, @f.away.players.length
assert_equal 1, @f.red_cards[:away].length
# Xavi ties the match
@f.goal(:home, 6)
assert_equal 1, @f.score[:home]
assert_equal 1, @f.goals[:home][6]
# Messi seals the victory
@f.goal(:home, 10)
assert_equal 2, @f.score[:home]
assert_equal 1, @f.goals[:home][10]
# Fulltime
assert @f.events(:final)
assert_equal false, @f.second_half
assert_equal false, @f.first_half
# Champions League Final stats
puts @f.stats
end
# A home and away team are required
def test_home_away
assert @g.home
assert @g.away
end
# Both home and away teams must have 11 players
def test_starting_lineups
assert_equal 11, @g.home.players.length
assert_equal 11, @g.away.players.length
end
# Positions normally have at least a certian number players
def test_players_per_position
assert_equal 1, @g.home.keepers.length
assert_operator 3, :<=, @g.home.defenders.length
assert_operator 3, :<=, @g.home.midfielders.length
assert_operator 1, :<=, @g.home.strikers.length
assert_equal 1, @g.away.keepers.length
assert_operator 3, :<=, @g.away.defenders.length
assert_operator 3, :<=, @g.away.midfielders.length
assert_operator 1, :<=, @g.away.strikers.length
end
def test_first_half_kickoff
assert @g.events(:first_half_kickoff)
assert @g.first_half
assert_equal false, @g.second_half
end
def test_half_time
assert @g.events(:half_time)
assert_equal false, @g.first_half
assert_equal false, @g.second_half
end
def test_second_half_kickoff
assert @g.events(:second_half_kickoff)
assert @g.second_half
assert_equal false, @g.first_half
end
def test_final_whistle
assert @g.events(:final)
assert_equal false, @g.second_half
assert_equal false, @g.first_half
end
def test_cards
# Show Pique yellow
assert_block "Pique isn't cautioned" do
@g.yellow_card(:home, 3)
end
assert_equal 1, @g.yellow_cards[:home].length
# Show Skrtel red
away_team_length = @g.away.players.length
assert_block "Skrtel wasn't sent to the showers" do
@g.red_card(:away, 37)
end
assert_equal away_team_length-1, @g.away.players.length
assert_equal 1, @g.away.showers.length
assert_equal 1, @g.red_cards[:away].length
# Show Pique second yellow then red
home_team_length = @g.home.players.length
assert_block "Pique wasn't sent off" do
@g.yellow_card(:home, 3)
end
assert_equal home_team_length-1, @g.home.players.length
assert_equal 1, @g.red_cards[:home].length
end
def test_scoring_a_goals
# Messi opens the scoring
@g.goal(:home, 10)
assert_equal 1, @g.score[:home]
assert_equal 1, @g.goals[:home][10]
# El Nino sneaks one in
@g.goal(:away, 9)
assert_equal 1, @g.score[:away]
assert_equal 1, @g.goals[:away][9]
# Ibra is so smooth
@g.goal(:home, 9)
assert_equal 2, @g.score[:home]
assert_equal 1, @g.goals[:home][9]
# Messi seals the victory
@g.goal(:home, 10)
assert_equal 3, @g.score[:home]
assert_equal 2, @g.goals[:home][10]
end
end
### SoccerGame.rb
require "SoccerTeam"
require "SoccerStats"
class SoccerGame
attr_accessor :title
attr_reader :home, :away,
:yellow_cards, :red_cards,
:clock, :score, :goals,
:first_half, :second_half
def initialize(home, away)
@home = SoccerTeam.new(home['club'],home['players'])
@away = SoccerTeam.new(away['club'],away['players'])
@yellow_cards = {:home => [], :away => []}
@red_cards = {:home => [], :away => []}
@score = {:home => 0, :away => 0}
@goals = {:home => {}, :away => {}}
@first_half = false
@second_half = false
end
def stats
s = SoccerStats.new
stats = "\n"+s.title(self.title)
stats << s.teams(@home.club, @away.club)
stats << s.final_score(@score[:home], @score[:away])
stats << "\n"+s.cards(:yellow, @yellow_cards[:away], @away)
stats << s.cards(:yellow, @yellow_cards[:home], @home)
stats << s.cards(:red, @red_cards[:away], @away)
stats << s.cards(:red, @red_cards[:home], @home)
stats << s.scorers(@goals, @home, @away)
stats
end
def events(whistle)
case whistle
when :first_half_kickoff then @first_half = true
when :half_time then @first_half = false
when :second_half_kickoff then @second_half = true
when :final then @second_half = false
end
@clock = Time.now.to_i
end
def count_players_on_pitch
msg = "team doesn't have the right number of players on the pitch"
if @home.players.length != 11
raise "Home" + msg
elsif @away.players.length != 11
raise "Away" + msg
end
end
def yellow_card(team, player)
# Second yellow card so, show a red
if @yellow_cards[team].index(player)
@yellow_cards[team].push player
red_card(team, player)
else
@yellow_cards[team].push player
end
end
def red_card(team, player)
@red_cards[team].push player
if team == :home
# Send player to the showers
@home.showers[player] = @home.players[player]
@home.players.delete(player)
else
@away.showers[player] = @away.players[player]
@away.players.delete(player)
end
end
def goal(team, player)
@score[team] += 1
if @goals[team][player]
@goals[team][player] += 1
else
@goals[team][player] = 1
end
end
end
### SoccerTeam.rb
class SoccerTeam
attr_accessor :showers
attr_reader :club, :players,
:keepers, :defenders, :midfielders, :strikers
def initialize(club, players)
@club = club
@players = {}
@keepers = {}
@defenders = {}
@midfielders = {}
@strikers = {}
@showers = {}
players.each do |number, name, position|
@players[number] = name
# Push player into position
case position
when :keeper then @keepers[number] = name
when :defender then @defenders[number] = name
when :midfielder then @midfielders[number] = name
when :striker then @strikers[number] = name
end
end
end
end
### SoccerStats.rb
class SoccerStats
def title(name)
self.own_line(name)
end
def teams(home,away)
self.own_line(away+" visiting "+home)
end
def final_score(home,away)
self.own_line(away.to_s+" / "+home.to_s)
end
def cards(type, cards, team)
str = ""
if !cards.empty?
if (type == :yellow)
str << "Yellow"
# Player hasn't been deleted from the team
# He was only shown a yellow card
player_hash = team.players
else
str << "Red"
# Player was deleted from the team
# He was shown a red card
player_hash = team.showers
end
str << " Cards:\n"
cards.each do |number|
str << number.to_s+"/"+player_hash[number]+"/"+team.club+"\n"
end
str = self.own_line(str)
end
str
end
def scorers(goals, home, away)
str = ""
if !goals.empty?
# Loop through each teams' goals, and print player number, name
and goals scored
{:home=>home,:away=>away}.each do |key, team|
if goals.has_key?(key)
goals[key].each do |number, goals|
str << number.to_s+"/"+team.players[number]+"/"+team.club+"
scores "+goals.to_s+" goal"
if goals > 1
str << "s"
end
str << "\n"
end
end
end
str = self.own_line("Goals:")+self.own_line(str)
end
str
end
def own_line(str)
str+"\n"
end
end
--
Posted via http://www.ruby-forum.com/.