[#326447] Python to Ruby Tutorial (need collborators) — r <rt8396@...>

Hello all,

20 messages 2009/02/01

[#326520] Minor 1.8 <-> 1.9 performance comparison gotcha — Gregory Brown <gregory.t.brown@...>

Excited and inspired by the Ruby 1.9.1 release, I wrote a blog post

10 messages 2009/02/02

[#326548] Quicker finding strings? Alternative for array, hash, set? — Patrick Put <patrick.put@...>

I've been searching for this information already, but cannot really find

10 messages 2009/02/02

[#326553] Variable declarations on one line — Frisco Del rosario <friscodelrosario@...>

a="al", b="bob", c="carl"

11 messages 2009/02/02

[#326570] Native gem roundup! — Charles Oliver Nutter <charles.nutter@...>

I'm curious what native gems/extensions people are typically using. In

40 messages 2009/02/02
[#326654] Re: Native gem roundup! — Tom Cloyd <tomcloyd@...> 2009/02/02

Charles Oliver Nutter wrote:

[#326607] How to tell if one is running 32 or 64 bit Ruby on Mac OS X? — Wes Gamble <weyus@...>

All,

14 messages 2009/02/02

[#326646] Hash counting — Stuart Clarke <stuart.clarke1986@...>

I am trying to load some data into a hash and then count how many times

22 messages 2009/02/02
[#326655] Re: Hash counting — Robert Klemme <shortcutter@...> 2009/02/02

On 02.02.2009 21:43, Stuart Clarke wrote:

[#326665] Re: Hash counting — Stuart Clarke <stuart.clarke1986@...> 2009/02/02

Thanks Robert.

[#326669] Re: Hash counting — Stuart Clarke <stuart.clarke1986@...> 2009/02/02

I have worked out the problem but I am a little unsure how to solve it.

[#326717] Re: Hash counting — Robert Klemme <shortcutter@...> 2009/02/03

2009/2/3 Stuart Clarke <stuart.clarke1986@gmail.com>:

[#326756] Re: Hash counting — Stuart Clarke <stuart.clarke1986@...> 2009/02/03

Thanks for replying and sorry for the confusion.

[#326758] Re: Hash counting — Robert Klemme <shortcutter@...> 2009/02/03

2009/2/3 Stuart Clarke <stuart.clarke1986@gmail.com>:

[#326762] Re: Hash counting — Stuart Clarke <stuart.clarke1986@...> 2009/02/03

Ok I will get straight to the code causing the problem, so first off you

[#326680] Is there an 'offical' Ruby binary for Windows? — Heesob Park <phasis@...>

I know that there are at least three Ruby Windows distributions.

12 messages 2009/02/03

[#326703] A Tk window — Albert Schlef <albertschlef@...>

I have a program that run in the terminal. But once in a while I need it

22 messages 2009/02/03

[#326761] 1.9.1? — yuckysocks <alex.m.mcpherson@...>

Hi there,

26 messages 2009/02/03

[#326858] Using a Class (not an instance) into threads — Iñaki Baz Castillo <ibc@...>

Hi, i'm using Ragel parser generating Ruby code. The generated code

19 messages 2009/02/04

[#326897] Making object methods available externally — David Stanford <dthomas53@...>

Hi all,

14 messages 2009/02/04

[#326953] a simple command that splits up a string into numbers and letters — shawn bright <nephish@...>

Hey all,

10 messages 2009/02/05

[#326957] Watir is acting retarded — Daniel Waite <rabbitblue@...>

This...

13 messages 2009/02/05

[#327048] Full Ruport Book manuscripts now on Github — Gregory Brown <gregory.t.brown@...>

Hi folks,

14 messages 2009/02/05
[#327088] Re: [ANN] Full Ruport Book manuscripts now on Github — Robert Dober <robert.dober@...> 2009/02/06

On Thu, Feb 5, 2009 at 11:51 PM, Gregory Brown

[#327103] Re: [ANN] Full Ruport Book manuscripts now on Github — Gregory Brown <gregory.t.brown@...> 2009/02/06

On Fri, Feb 6, 2009 at 6:08 AM, Robert Dober <robert.dober@gmail.com> wrote:

[#327171] Re: [ANN] Full Ruport Book manuscripts now on Github — Rick DeNatale <rick.denatale@...> 2009/02/06

On Fri, Feb 6, 2009 at 8:50 AM, Gregory Brown <gregory.t.brown@gmail.com>wrote:

[#327172] Re: [ANN] Full Ruport Book manuscripts now on Github — Gregory Brown <gregory.t.brown@...> 2009/02/06

On Fri, Feb 6, 2009 at 4:46 PM, Rick DeNatale <rick.denatale@gmail.com> wrote:

[#327060] Method Precedence — Daly <aeldaly@...>

Hello all,

15 messages 2009/02/06

[#327126] Mathematical Image Generator (#191) — Daniel Moore <yahivin@...>

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

11 messages 2009/02/06

[#327129] Special Hash Constructors — Robert Klemme <shortcutter@...>

15 messages 2009/02/06

[#327146] eval statement — Jonathan Wills <runningwild@...>

Trying to switch a project of mine from python to ruby. Love ruby so

26 messages 2009/02/06

[#327215] Module#=== vs Object#is_a? — Peter Fitzgibbons <peter.fitzgibbons@...>

HI All,

14 messages 2009/02/07

[#327223] cannot remove multiple spaces — Tom Cloyd <tomcloyd@...>

I'm baffled by this strange outcome - I cannot reduce multiple spaces

16 messages 2009/02/07

[#327224] Ruby vs Perl performance — Vetrivel Vetrivel <vetrivel.bksys@...>

I have downloaded perl and ruby program in net.I run both the

77 messages 2009/02/07
[#327260] Re: Ruby vs Perl performance — Igor Pirnovar <gooigpi@...> 2009/02/07

Vetrivel Vetrivel wrote:

[#327393] Re: Ruby vs Perl performance — Chad Perrin <perrin@...> 2009/02/09

On Sun, Feb 08, 2009 at 03:22:20AM +0900, Igor Pirnovar wrote:

[#327444] Re: Ruby vs Perl performance — Robert Klemme <shortcutter@...> 2009/02/09

Chad, I generally agree, however...

[#327471] Re: Ruby vs Perl performance — David Masover <ninja@...> 2009/02/09

Robert Klemme wrote:

[#327483] Re: Ruby vs Perl performance — Robert Klemme <shortcutter@...> 2009/02/09

On 09.02.2009 19:15, David Masover wrote:

[#327489] Re: Ruby vs Perl performance — David Masover <ninja@...> 2009/02/09

Robert Klemme wrote:

[#327564] Re: Ruby vs Perl performance — Robert Klemme <shortcutter@...> 2009/02/10

2009/2/9 David Masover <ninja@slaphack.com>:

[#327573] Re: Ruby vs Perl performance — David Masover <ninja@...> 2009/02/10

Robert Klemme wrote:

[#327306] ruby interpreter written in ruby.. — Eelco <catsquotl@...>

Hi there,

13 messages 2009/02/08

[#327332] calling random — Boris Schmid <borisschmid@...>

Apologies, I have been out of using ruby for a while, and ran into

12 messages 2009/02/08

[#327346] best way to protect class instance variables — Barun Singh <barunio@...>

Suppose I generate a class instance variable and create an accessor

10 messages 2009/02/08

[#327403] Ruby file to Executable file -- for all OS — jazzez ravi <jazzezravi@...>

Hi All,

13 messages 2009/02/09
[#327521] Re: Ruby file to Executable file -- for all OS — jazzez ravi <jazzezravi@...> 2009/02/10

[#327525] Re: Ruby file to Executable file -- for all OS — David Masover <ninja@...> 2009/02/10

jazzez ravi wrote:

[#327419] Which is the best development environment? Windows Vs Linux — priyankeshu <priyankeshu.parihar@...>

I just started learnign Rails and i think it's quite cool! I have just

14 messages 2009/02/09

[#327434] regexp problem — Joao Silva <rubyforum@...>

how i can extract:

21 messages 2009/02/09

[#327492] Got SystemStackError exception: stack level too deep — Bezan Kapadia <bezan99@...>

I have master Process that is forking 2 child processes in the

16 messages 2009/02/09
[#327494] Re: Got SystemStackError exception: stack level too deep — Tony Arcieri <tony@...> 2009/02/09

On Mon, Feb 9, 2009 at 4:12 PM, Bezan Kapadia <bezan99@gmail.com> wrote:

[#327498] Re: Got SystemStackError exception: stack level too deep — Bezan Kapadia <bezan99@...> 2009/02/10

I see ...

[#327510] Ruby GUI Survey: Results — Alex Fenton <alex@...>

The results of the survey of Ruby GUI programming carried out at the end

13 messages 2009/02/10

[#327522] a better way to do this job? — Zhenning Guan <g.zhen.ning@...>

topics.each do |f|

34 messages 2009/02/10
[#327532] Re: a better way to do this job? — Ryan Davis <ryand-ruby@...> 2009/02/10

[#327542] Re: a better way to do this job? — Julian Leviston <julian@...> 2009/02/10

First doesn't take an argument I'm ruby. It does

[#327560] Float in Spreadsheet — Jim Burgess <igsnhelp@...>

Hi,

15 messages 2009/02/10
[#327852] Re: Float in Spreadsheet — Jim Burgess <igsnhelp@...> 2009/02/12

Can no one help me?

[#327610] how to do the recursion — Li Chen <chen_li3@...>

Hi all,

14 messages 2009/02/11

[#327704] If you are unhappy with the direction of Ruby 1.8.7+, respond — Gregory Brown <gregory.t.brown@...>

I am setting up two threads in the hopes that we can see names

188 messages 2009/02/11
[#327721] Re: If you are unhappy with the direction of Ruby 1.8.7+, respond — "M. Edward (Ed) Borasky" <zznmeb@...> 2009/02/11

I've posted my opinions on Ruby-Core, but I'll summarize them here:

[#327756] Re: If you are unhappy with the direction of Ruby 1.8.7+, respond — Rick DeNatale <rick.denatale@...> 2009/02/11

On Wed, Feb 11, 2009 at 12:10 PM, Gregory Brown

[#327769] Re: If you are unhappy with the direction of Ruby 1.8.7+, respond — Pit Capitain <pit.capitain@...> 2009/02/11

2009/2/11 Rick DeNatale <rick.denatale@gmail.com>:

[#327774] Re: If you are unhappy with the direction of Ruby 1.8.7+, respond — James Gray <james@...> 2009/02/11

On Feb 11, 2009, at 3:42 PM, Pit Capitain wrote:

[#327892] Re: If you are unhappy with the direction of Ruby 1.8.7+, respond — Stefan Lang <perfectly.normal.hacker@...> 2009/02/12

2009/2/11 James Gray <james@grayproductions.net>:

[#327897] Re: If you are unhappy with the direction of Ruby 1.8.7+, respond — James Coglan <jcoglan@...> 2009/02/12

>

[#327901] Re: If you are unhappy with the direction of Ruby 1.8.7+, respond — Stefan Lang <perfectly.normal.hacker@...> 2009/02/12

2009/2/12 James Coglan <jcoglan@googlemail.com>:

[#327905] Re: If you are unhappy with the direction of Ruby 1.8.7+, respond — James Coglan <jcoglan@...> 2009/02/12

>

[#327910] Re: If you are unhappy with the direction of Ruby 1.8.7+, respond — Stefan Lang <perfectly.normal.hacker@...> 2009/02/12

2009/2/12 James Coglan <jcoglan@googlemail.com>:

[#327914] Re: If you are unhappy with the direction of Ruby 1.8.7+, respond — Ezra Zygmuntowicz <ezmobius@...> 2009/02/12

[#327918] Re: If you are unhappy with the direction of Ruby 1.8.7+, respond — Gregory Brown <gregory.t.brown@...> 2009/02/12

On Thu, Feb 12, 2009 at 12:22 PM, Ezra Zygmuntowicz <ezmobius@gmail.com> wrote:

[#327954] Re: If you are unhappy with the direction of Ruby 1.8.7+, respond — Pit Capitain <pit.capitain@...> 2009/02/12

2009/2/12 Gregory Brown <gregory.t.brown@gmail.com>:

[#327957] Re: If you are unhappy with the direction of Ruby 1.8.7+, respond — Gregory Brown <gregory.t.brown@...> 2009/02/12

On Thu, Feb 12, 2009 at 1:59 PM, Pit Capitain <pit.capitain@gmail.com> wrote:

[#327919] Re: If you are unhappy with the direction of Ruby 1.8.7+, respond — Rick DeNatale <rick.denatale@...> 2009/02/12

On Thu, Feb 12, 2009 at 12:22 PM, Ezra Zygmuntowicz <ezmobius@gmail.com>wrote:

[#328043] Re: If you are unhappy with the direction of Ruby 1.8.7+, respond — "William James" <w_a_x_man@...> 2009/02/13

James Coglan wrote:

[#328073] Re: If you are unhappy with the direction of Ruby 1.8.7+, respond — Rick DeNatale <rick.denatale@...> 2009/02/13

On Fri, Feb 13, 2009 at 4:53 AM, William James <w_a_x_man@yahoo.com> wrote:

[#328076] Re: If you are unhappy with the direction of Ruby 1.8.7+, respond — "David A. Black" <dblack@...> 2009/02/13

Hi --

[#328079] Re: If you are unhappy with the direction of Ruby 1.8.7+, respond — James Coglan <jcoglan@...> 2009/02/13

2009/2/13 David A. Black <dblack@rubypal.com>

[#328082] Re: If you are unhappy with the direction of Ruby 1.8.7+, respond — "David A. Black" <dblack@...> 2009/02/13

Hi --

[#328084] Re: If you are unhappy with the direction of Ruby 1.8.7+, respond — James Coglan <jcoglan@...> 2009/02/13

>

[#327705] If you are happy with the direction of Ruby 1.8.7+, respond — Gregory Brown <gregory.t.brown@...>

I am setting up two threads in the hopes that we can see names

31 messages 2009/02/11

[#327754] Array uniq — Stuart Little <stuart_clarke1986@...>

I am having some troubles with the uniq method for arrays. This is a

18 messages 2009/02/11

[#328065] Meaning of "<<"? — Chris Davies <chris-usenet@...>

Hi,

15 messages 2009/02/13

[#328140] Good GUI documentation — Ruby Student <ruby.student@...>

Hello all you happy GUIsher!

27 messages 2009/02/13

[#328261] Multidimensional hash - get all not blank keys — "Michael .." <xinu@...>

Hello.

13 messages 2009/02/15

[#328279] Iterating a changing Hash under 1.9.1 — Phrogz <phrogz@...>

The following code shows that Hash#each under 1.9.1p0 does not iterate

18 messages 2009/02/15

[#328320] invalid byte sequence in US-ASCII (ArgumentError) — Luther <lutheroto@...>

I'm having some trouble migrating from 1.8 to 1.9.1. I have this line of

20 messages 2009/02/16
[#328321] Re: invalid byte sequence in US-ASCII (ArgumentError) — Tim Hunter <TimHunter@...> 2009/02/16

Luther wrote:

[#328333] Re: invalid byte sequence in US-ASCII (ArgumentError) — Luther <lutheroto@...> 2009/02/16

On Mon, 2009-02-16 at 09:19 +0900, Tim Hunter wrote:

[#328349] Re: invalid byte sequence in US-ASCII (ArgumentError) — Tom Link <micathom@...> 2009/02/16

> but now I know my program will puke

[#328323] ffi-ncurses version 0.3.0 — "Sean O'Halpin" <sean.ohalpin@...>

ffi-ncurses version 0.3.0

10 messages 2009/02/16

[#328338] vim for ruby — Bharat Ruparel <bcruparel@...>

I am using Ubuntu 7.10. I installed vim-ruby package to get the ruby

19 messages 2009/02/16
[#328397] Re: vim for ruby — Bertram Scharpf <lists@...> 2009/02/16

Hi,

[#328345] What are your favorite Ruby features? — Tony Arcieri <tony@...>

I'm creating a new language which borrows heavily from Ruby, and I'm curious

71 messages 2009/02/16
[#328379] Re: What are your favorite Ruby features? — Robert Dober <robert.dober@...> 2009/02/16

On Mon, Feb 16, 2009 at 5:26 AM, Tony Arcieri <tony@medioh.com> wrote:

[#328382] Re: What are your favorite Ruby features? — "David A. Black" <dblack@...> 2009/02/16

Hi --

[#328395] Re: What are your favorite Ruby features? — Robert Dober <robert.dober@...> 2009/02/16

On Mon, Feb 16, 2009 at 12:36 PM, David A. Black <dblack@rubypal.com> wrote=

[#328400] Re: What are your favorite Ruby features? — "David A. Black" <dblack@...> 2009/02/16
[#328419] Re: What are your favorite Ruby features? — Robert Dober <robert.dober@...> 2009/02/16

On Mon, Feb 16, 2009 at 2:13 PM, David A. Black <dblack@rubypal.com> wrote:

[#328452] Re: What are your favorite Ruby features? — Brian Candler <b.candler@...> 2009/02/16

Tony Arcieri wrote:

[#328473] Re: What are your favorite Ruby features? — Tony Arcieri <tony@...> 2009/02/17

On Mon, Feb 16, 2009 at 1:31 PM, Brian Candler <b.candler@pobox.com> wrote:

[#328498] Re: What are your favorite Ruby features? — David Masover <ninja@...> 2009/02/17

Tony Arcieri wrote:

[#328523] Re: What are your favorite Ruby features? — Juan Zanos <juan_zanos@...> 2009/02/17

[#328532] Re: What are your favorite Ruby features? — Rick DeNatale <rick.denatale@...> 2009/02/17

On Tue, Feb 17, 2009 at 9:44 AM, Juan Zanos <juan_zanos@talkhouse.com>wrote=

[#328541] Re: What are your favorite Ruby features? — David Masover <ninja@...> 2009/02/17

Rick DeNatale wrote:

[#328596] Re: What are your favorite Ruby features? — Rick DeNatale <rick.denatale@...> 2009/02/18

On Tue, Feb 17, 2009 at 2:40 PM, David Masover <ninja@slaphack.com> wrote:

[#328600] Re: What are your favorite Ruby features? — Robert Dober <robert.dober@...> 2009/02/18

On Wed, Feb 18, 2009 at 2:38 PM, Rick DeNatale <rick.denatale@gmail.com> wrote:

[#328373] How to do this complicated logic in ruby — Valentino Lun <sumwo@...>

Dear all

10 messages 2009/02/16

[#328560] Tree structure - how do we link nodes together? — Aldric Giacomoni <"aldric[removeme]"@...>

I know I could just use rubytree, which looks quite nice, but I'd like

19 messages 2009/02/18

[#328702] literal syntax for array of arrays of strings — Joel VanderWerf <vjoel@...>

17 messages 2009/02/19

[#328775] How to do conditional compile for Ruby 1.9 in a C extension? — Jason Garber <jg@...>

I'm working on updating RedCloth for Ruby 1.9. Since the output of

14 messages 2009/02/19

[#328808] How does one generate a "main page" for rdoc documentation? — Kenneth McDonald <kenneth.m.mcdonald@...>

I tried

21 messages 2009/02/19
[#328814] Re: How does one generate a "main page" for rdoc documentation? — Rick DeNatale <rick.denatale@...> 2009/02/19

On Thu, Feb 19, 2009 at 4:24 PM, Kenneth McDonald <

[#328815] Re: How does one generate a "main page" for rdoc documentation? — Joel VanderWerf <vjoel@...> 2009/02/19

Rick DeNatale wrote:

[#328817] Re: How does one generate a "main page" for rdoc documentation? — Igor Pirnovar <gooigpi@...> 2009/02/19

Where did you get the syntax for your:

[#328825] Re: How does one generate a "main page" for rdoc documentation? — James Britt <james.britt@...> 2009/02/20

Igor Pirnovar wrote:

[#328833] Re: How does one generate a "main page" for rdoc documentation? — Tom Link <micathom@...> 2009/02/20

> > | rdoc --main maindocpage rex.rb |

[#328840] Re: How does one generate a "main page" for rdoc documentation? — James Britt <james.britt@...> 2009/02/20

Tom Link wrote:

[#328902] what Ruby version to use on Windows for a 1.2.x RoR app? — neongrau __ <neongrau@...>

hi there!

20 messages 2009/02/20
[#328947] Re: what Ruby version to use on Windows for a 1.2.x RoR app? — Roger Pack <rogerpack2005@...> 2009/02/21

> isn't there any memory stable ruby version for windows?

[#329156] Re: what Ruby version to use on Windows for a 1.2.x RoR app? — neongrau __ <neongrau@...> 2009/02/23

Roger Pack wrote:

[#329172] Re: what Ruby version to use on Windows for a 1.2.x RoR app? — Roger Pack <rogerpack2005@...> 2009/02/23

[#329275] Re: what Ruby version to use on Windows for a 1.2.x RoR app? — neongrau __ <neongrau@...> 2009/02/24

Roger Pack wrote:

[#329530] Re: what Ruby version to use on Windows for a 1.2.x RoR app? — Roger Pack <rogerpack2005@...> 2009/02/25

neongrau __ wrote:

[#329592] Re: what Ruby version to use on Windows for a 1.2.x RoR app? — neongrau __ <neongrau@...> 2009/02/26

Roger Pack wrote:

[#329685] Re: what Ruby version to use on Windows for a 1.2.x RoR app? — Roger Pack <rogerpack2005@...> 2009/02/26

> and don't have any compiler on my XP vmware installation yet.

[#329801] Re: what Ruby version to use on Windows for a 1.2.x RoR app? — neongrau __ <neongrau@...> 2009/02/27

i have no experience with git, i just did this:

[#328967] encoding problem with tr() and hash keys — Do One <do1@...>

Please help to understand solution to this problem (ruby 1.9.1):

17 messages 2009/02/21
[#329141] Re: encoding problem with tr() and hash keys — Brian Candler <b.candler@...> 2009/02/23

Do One wrote:

[#328981] How to call a module method dynamically — Adrian Klingel <adrian.klingel@...>

I know about object instantiation and the send method, but the methods I

11 messages 2009/02/21

[#329029] Nexus Programming Language — Avatar <acampbellb@...>

A new object-oriented programming language has been unofficially

133 messages 2009/02/21
[#329048] Re: Nexus Programming Language — Ken Bloom <kbloom@...> 2009/02/22

On Sat, 21 Feb 2009 15:37:34 -0800, Avatar wrote:

[#329136] Re: Nexus Programming Language — Chad Perrin <perrin@...> 2009/02/23

On Mon, Feb 23, 2009 at 01:09:34AM +0900, Ken Bloom wrote:

[#329138] Re: Nexus Programming Language — Eleanor McHugh <eleanor@...> 2009/02/23

On 23 Feb 2009, at 12:38, Chad Perrin wrote:

[#329177] Re: Nexus Programming Language — Chad Perrin <perrin@...> 2009/02/23

On Mon, Feb 23, 2009 at 09:48:44PM +0900, Eleanor McHugh wrote:

[#329183] Re: Nexus Programming Language — Eleanor McHugh <eleanor@...> 2009/02/23

On 23 Feb 2009, at 19:47, Chad Perrin wrote:

[#329184] Re: Nexus Programming Language — "M. Edward (Ed) Borasky" <zznmeb@...> 2009/02/23

On Mon, Feb 23, 2009 at 12:21 PM, Eleanor McHugh

[#329218] Re: Nexus Programming Language — Avatar <acampbellb@...> 2009/02/24

On Feb 23, 3:21=A0pm, Eleanor McHugh <elea...@games-with-brains.com>

[#329297] Re: Nexus Programming Language — Tom Cloyd <tomcloyd@...> 2009/02/24

Avatar wrote:

[#329365] Re: Nexus Programming Language — Eleanor McHugh <eleanor@...> 2009/02/25

On 24 Feb 2009, at 13:44, Tom Cloyd wrote:

[#329317] Re: Nexus Programming Language — pjb@... (Pascal J. Bourguignon) 2009/02/24

Gregory Brown <gregory.t.brown@gmail.com> writes:

[#329067] Improving hexadecimal escaping performance — Iñaki Baz Castillo <ibc@...>

Hi, I've a module with two methods (thanks Jeff):

11 messages 2009/02/23

[#329179] pointer and other questions — Daniel Schoch <trash@...>

Hi,

16 messages 2009/02/23
[#329182] Re: pointer and other questions — Robert Klemme <shortcutter@...> 2009/02/23

On 23.02.2009 21:00, Daniel Schoch wrote:

[#329187] Re: pointer and other questions — Daniel Schoch <trash@...> 2009/02/23

>

[#329330] Can Ruby interact with the shell sh ? — Raimon Fs <coder@...>

Hello,

12 messages 2009/02/24

[#329332] error trying to install ruby gems 1.3.1 — 7stud -- <bbxx789_05ss@...>

~/my_tar_extractions/rubygems-1.3.1$ sudo ruby setup.rb

12 messages 2009/02/24

[#329426] Where is splat implemented? / How does it work? — Mischa Fierer <f.mischa@...>

Hi --

12 messages 2009/02/25

[#329478] What is the Qur窶凖「n? — al albani <imanway123@...>

20 messages 2009/02/25

[#329532] Religious discussion — Julian Leviston <julian@...>

Hi all. I've thought quite a long time bout this, and I hope this is a

13 messages 2009/02/25
[#329657] Re: Religious discussion — Kyle Schmitt <kyleaschmitt@...> 2009/02/26

On Wed, Feb 25, 2009 at 4:19 PM, Julian Leviston <julian@coretech.net.au> wrote:

[#329554] Sample Chapter from "Ruby Best Practices" — Gregory Brown <gregory.t.brown@...>

== The short story

12 messages 2009/02/26

[#329671] Letter writing campaign to Jim — Aaron Patterson <aaron@...>

"Rake version 0.8.4 has been released!" is what you would be reading if

16 messages 2009/02/26
[#329683] Re: [ANN] Letter writing campaign to Jim — Gregory Brown <gregory.t.brown@...> 2009/02/26

On Thu, Feb 26, 2009 at 1:33 PM, Aaron Patterson

[#329710] Re: [ANN] Letter writing campaign to Jim — Aaron Turner <synfinatic@...> 2009/02/26

On Thu, Feb 26, 2009 at 11:37 AM, Gregory Brown

[#329715] Re: [ANN] Letter writing campaign to Jim — Aaron Patterson <aaron@...> 2009/02/26

On Fri, Feb 27, 2009 at 05:49:08AM +0900, Aaron Turner wrote:

[#329672] Any plans for a "OneClickInstaller for Ruby 1.9.1? — Ruby Student <ruby.student@...>

TWIMC,

10 messages 2009/02/26

[#329759] Setting the contents of a file to a variable? — Stefan Codrescu <fixxie.wits@...>

Ok so...

16 messages 2009/02/27
[#329766] Re: Setting the contents of a file to a variable? — Justin Collins <justincollins@...> 2009/02/27

Stefan Codrescu wrote:

[#330556] Re: Setting the contents of a file to a variable? — Stefan Codrescu <fixxie.wits@...> 2009/03/06

ok, thanks ill try that but i also found

[#330680] Re: Setting the contents of a file to a variable? — Brian Candler <b.candler@...> 2009/03/08

Stefan Codrescu wrote:

[#329804] How to find the specific row of CSV file. — Salil Gaikwad <salil@...>

I want to change or read only specific row of CSV file, i don't know how

18 messages 2009/02/27
[#329822] Re: How to find the specific row of CSV file. — James Gray <james@...> 2009/02/27

On Feb 27, 2009, at 8:19 AM, Salil Gaikwad wrote:

[#329883] Re: How to find the specific row of CSV file. — Salil Gaikwad <salil@...> 2009/02/28

My code is as follows

[#329905] Re: How to find the specific row of CSV file. — Craig Demyanovich <cdemyanovich@...> 2009/02/28

First, let's create a rough, high-level solution to your problem.

[#329985] Re: How to find the specific row of CSV file. — Salil Gaikwad <salil@...> 2009/03/01

thanx james & craig

[#329987] Re: How to find the specific row of CSV file. — Craig Demyanovich <cdemyanovich@...> 2009/03/01

On Sun, Mar 1, 2009 at 8:06 AM, Salil Gaikwad <salil@cipher-tech.com> wrote:

[#329990] Re: How to find the specific row of CSV file. — Salil Gaikwad <salil@...> 2009/03/01

thanx for quick reply

[#329871] Marshal.load does not create new instances? — Ian Trudel <ian.trudel@...>

Marshal does not seem to instantiate given class(es) on load. Moreover,

18 messages 2009/02/27
[#329875] Re: Marshal.load does not create new instances? — 7stud -- <bbxx789_05ss@...> 2009/02/28

Ian Trudel wrote:

[#329878] Re: Marshal.load does not create new instances? — Ian Trudel <ian.trudel@...> 2009/02/28

7stud -- wrote:

[#329900] Re: Marshal.load does not create new instances? — Pit Capitain <pit.capitain@...> 2009/02/28

2009/2/28 Ian Trudel <ian.trudel@gmail.com>:

[#329907] Re: Marshal.load does not create new instances? — Robert Klemme <shortcutter@...> 2009/02/28

2009/2/28 Pit Capitain <pit.capitain@gmail.com>:

[#329896] Hi..About Gsoc 2009 project ideas... — usw wickramasinghe <mastershield2007@...>

Hi,

15 messages 2009/02/28

[#329909] How to put multiple values into a variable. — Harry Nash <hjnash@...>

I am new to coding, I have tried to place a number of data strings into

11 messages 2009/02/28

[#329942] Priorities for JRuby 1.3 — Charles Oliver Nutter <charles.nutter@...>

With JRuby 1.2 almost out the door, we should talk a bit about where to

17 messages 2009/02/28

Re: custom assertion message for unit tests

From: Rob Biedenharn <Rob@...>
Date: 2009-02-05 03:28:52 UTC
List: ruby-talk #326947
On Feb 4, 2009, at 8:39 PM, Will Parsons wrote:
> Rob Biedenharn wrote:
>> On Feb 4, 2009, at 5:59 PM, Will Parsons wrote:
>>
>>> I'm having trouble trying to figure out how to customize an  
>>> assertion
>>> message when running unit tests.  In particular, I want to check the
>>> permissions on a file, so I have something like:
>>>
>>> assert_equal(0755, File.stat(test_file).mode & 0777)
>>>
>>> If it fails, I get a message like:
>>>
>>> <493> expected but was
>>> <420>.
>>>
>>> and of course I would like the expected and actual permissions to be
>>> displayed in octal rather than decimal.  How can I do that?
>>
>> Perhaps something like:
...
>>
>>   1) Failure:
>> test_bad_file_mode(SomeTest) [-:9]:
>> Mode of some_file.
>> <"0755"> expected but was
>> <"0644">.
>>
>> 2 tests, 2 assertions, 1 failures, 0 errors
>
> This is certainly an improvement on my version, but it is not  
> completely
> satisfying - the reason being that by explicitly converting the  
> permissions
> to a string they get displayed as strings, i.e., I would like to see:
>
>  <755> expected
>
> rather than:
>
>  <"0755"> expected
>
>> Note that I'm doing the conversion to octal myself with the '%#o' and
>> String#%
>>
>> It would be better to pull this into a helper method:
>>
>> $ ruby -r'test/unit'
>> class SomeTest < Test::Unit::TestCase
>>   def assert_mode(expected_mode, actual_mode, message=nil)
>>     assert_equal '%#o'%expected_mode, '%#o'%actual_mode, message
>>   end
>>
>>   def setup
>>     @test_file = 'some_file'
>>     File.open(@test_file, 'w') {|f| f.write "Hello!"}
>>   end
>>   def test_bad_file_mode
>>     File.chmod(0644, @test_file)
>>
>>     assert_mode 0755, File.stat(@test_file).mode & 0777, "Mode of
>> #{@test_file}"
>>   end
>>
>>   def test_good_file_mode
>>     File.chmod(0755, @test_file)
>>
>>     assert_mode 0755, File.stat(@test_file).mode & 0777, "Mode of
>> #{@test_file}"
>>   end
>> end
>> __END__
>> Loaded suite -
>> Started
>> F.
>> Finished in 0.0107 seconds.
>>
>>   1) Failure:
>> test_bad_file_mode(SomeTest)
>>     [-:3:in `assert_mode'
>>      -:13:in `test_bad_file_mode']:
>> Mode of some_file.
>> <"0755"> expected but was
>> <"0644">.
>>
>> 2 tests, 2 assertions, 1 failures, 0 errors
>
> I'm not sure I understand this - what's the advantage of defining the
> assert_mode method over using the already defined methods?

Look at the resulting test and it's failure message:
   assert_mode 0755, File.stat(@test_file).mode & 0777

<"0755"> expected but was
<"0644">.

Compared to what you had to start:
   assert_equal(0755, File.stat(test_file).mode & 0777)

<493> expected but was
<420>.

Pretty close, no?

>> Do you really want
>>   assert File.stat(@test_file).executable?
>> instead of a specific mode?
>
> Yes, because I want also to check for being read-only in addition to  
> being
> executable in the file permissions.
>
> -- 
> Will

But you could go all the way with:

$ cat ml_mode_test.rb
require 'test/unit'

module Test
   module Unit
     module Assertions
       ##
       # Asserts that the octal modes are equal.
       # If given a +:mask+ option, will only compare those bits.
       #
       # Example:
       #   assert_mode 0444, File.stat(name).mode, "Always  
readable", :mask => 0777
       #
       def assert_mode(expected_mode, actual_mode,  
options_or_message=nil, options=nil)
         if options.nil? && Hash === options_or_message
           message, options = nil, options_or_message
         elsif
           message = options_or_message
         end
         full_message = message ? message.chomp+"\n" : ''
         full_message << "<%#o> expected but was\n<%#o>"% 
[expected_mode, actual_mode]
         if Hash === options && options.has_key?(:mask)
           mask = options[:mask]
           expected_mode &= mask
           actual_mode &= mask
           full_message << " (applying %#o mask)"%mask
         end
         assert_block(full_message) { expected_mode == actual_mode }
       end
     end
   end
end

class SomeTest < Test::Unit::TestCase

   def setup
     @test_file = 'some_file'
     File.open(@test_file, 'w') {|f| f.write "Hello!"}
     File.chmod(0644, @test_file)
   end

   def test_with_equal
     assert_equal 0755, File.stat(@test_file).mode & 0777
   end

   def test_with_equal_and_message
     assert_equal 0755, File.stat(@test_file).mode & 0777, "equal?"
   end

   def test_with_mode
     assert_mode 0755, File.stat(@test_file).mode & 0777
   end

   def test_with_mode_and_mask
     assert_mode 0755, File.stat(@test_file).mode, :mask => 0777
   end

   def test_with_mode_and_message
     assert_mode 0755, File.stat(@test_file).mode & 0777, "executable?"
   end

   def test_with_mode_big_finish
     assert_mode 0755, File.stat(@test_file).mode,  
"executable?", :mask => 0777
   end

end
__END__
rab:code/ruby $ ruby ml_mode_test.rb
Loaded suite ml_mode_test
Started
FFFFFF
Finished in 0.074508 seconds.

   1) Failure:
test_with_equal(SomeTest) [ml_mode_test.rb:42]:
<493> expected but was
<420>.

   2) Failure:
test_with_equal_and_message(SomeTest) [ml_mode_test.rb:46]:
equal?.
<493> expected but was
<420>.

   3) Failure:
test_with_mode(SomeTest)
     [ml_mode_test.rb:27:in `assert_mode'
      ml_mode_test.rb:50:in `test_with_mode']:
<0755> expected but was
<0644>

   4) Failure:
test_with_mode_and_mask(SomeTest)
     [ml_mode_test.rb:27:in `assert_mode'
      ml_mode_test.rb:54:in `test_with_mode_and_mask']:
<0755> expected but was
<0100644> (applying 0777 mask)

   5) Failure:
test_with_mode_and_message(SomeTest)
     [ml_mode_test.rb:27:in `assert_mode'
      ml_mode_test.rb:58:in `test_with_mode_and_message']:
executable?
<0755> expected but was
<0644>

   6) Failure:
test_with_mode_big_finish(SomeTest)
     [ml_mode_test.rb:27:in `assert_mode'
      ml_mode_test.rb:62:in `test_with_mode_big_finish']:
executable?
<0755> expected but was
<0100644> (applying 0777 mask)

6 tests, 6 assertions, 6 failures, 0 errors

It just depends on how far you want to take it.

-Rob

Rob Biedenharn		http://agileconsultingllc.com
Rob@AgileConsultingLLC.com


In This Thread