Dynamically require and include code in application399 (3/11/2010 6:38:18 PM) comp.lang.ruby I was hoping to dynamically load and include code in my application.
After some struggle, i've got this working. Wish to know if this is the
cleanest way to do so:
Since include has a problem (NoMethod) i ... R
Automated testing of visual library (ncurses)9135 (12/31/2009 1:02:36 PM) comp.lang.ruby As i work more on a ncurses widget library, I am wondering how does one
do automated testing for a software that is primarily visual. Whenever i
make changes, I need to ensure that things still show correctly... rkumar
ruby 1.9: handling meta and control keys335 (10/4/2009 7:07:58 AM) comp.lang.ruby 1.8 used to return an int for say ?\M-a or ?C-a (when user types meta-a or control-a). 1.9 returns a string as "\xE1" instead of 225. The only way i have been able to convert "\xE1" to 225 is removing the fir... rkumar
Ncurses run time error with ruby 1.9.1339 (10/3/2009 11:05:21 AM) comp.lang.ruby I've just installed ruby 1.9.1 (port install). I gem installed ncurses, it gave errors. After much searching i found this: Ruby 1.9.1 RARRAY(x)->len should be RARRAY_LEN(x) Changed the code, it compiled f... RK
Having a gem for 1.8 and 1.9527 (10/2/2009 5:00:42 PM) comp.lang.ruby This is a simple query ... I am back after a long hiatus so have forgotten some basics of gem creation. 1. I am porting my gem from 1.8 to 1.9. I suppose if I just create a new version of the gem... RK
bug fixing between gem releases036 (2/13/2009 5:51:27 AM) comp.lang.ruby Not sure how to word this ... 1. I've release my first gem. So now when I am doing bug fixes, since my code points to the gem (earlier it had a path statement in the first line), should i be recreating and ins... RK
Sorting array with nils255 (1/24/2009 10:03:24 AM) comp.lang.ruby I have been browsing but given answers are not suiting me. I hava a double dim array like a dataset. I thus *cannot* use compact since that would knock off rows. Some answers say a nil cannot be compared to an... RK
String doesnt auto dup on modification3422 (1/21/2009 7:15:53 PM) comp.lang.ruby I'm writing my first largeish app. One issue that gets me frequently is this: I define a string in one class. Some other class references it, and modifies it. I (somehow) expected that when another referer mod... RK
Why do true and false have separate classes1732 (1/14/2009 1:26:32 PM) comp.lang.ruby This has puzzled me a bit. I googled and came up with responses like -- in any case we use respond_to? for duck typing. I am writing a program in which some classes behave differently depending on the data in ... Ruby
Implementing each and <=>1030 (1/13/2009 7:08:05 PM) comp.lang.ruby I have a data model and would like to let it be Enumerable. I want to confirm if this is the way of implementing each and : def each @list.each { |item| yield item } end def (other) @... Ruby
Sorting array with nils255 (1/24/2009 10:03:24 AM) comp.lang.ruby I have been browsing but given answers are not suiting me. I hava a double dim array like a dataset. I thus *cannot* use compact since that would knock off rows. Some answers say a nil cannot be compared to an... sentinel.2001(154)
The New Delhi Ruby February Meetup127 (2/24/2009 8:37:27 AM) comp.lang.ruby We're a very open, fun and friendly ruby meetup group in New Delhi, India and we have something for everyone, from the curious who just appreciates the ruby, to the intermediate learner who wants to learn best ... kapil(1)
Having a gem for 1.8 and 1.9527 (10/2/2009 5:00:42 PM) comp.lang.ruby This is a simple query ... I am back after a long hiatus so have forgotten some basics of gem creation. 1. I am porting my gem from 1.8 to 1.9. I suppose if I just create a new version of the gem... sentinel.2001(154)
Ncurses run time error with ruby 1.9.1339 (10/3/2009 11:05:21 AM) comp.lang.ruby I've just installed ruby 1.9.1 (port install). I gem installed ncurses, it gave errors. After much searching i found this: Ruby 1.9.1 RARRAY(x)->len should be RARRAY_LEN(x) Changed the code, it compiled f... sentinel.2001(154)
ruby 1.9: handling meta and control keys335 (10/4/2009 7:07:58 AM) comp.lang.ruby 1.8 used to return an int for say ?\M-a or ?C-a (when user types meta-a or control-a). 1.9 returns a string as "\xE1" instead of 225. The only way i have been able to convert "\xE1" to 225 is removing the fir... sentinel.2001(154)
Is 'rescue' expensive ?11120 (1/12/2010 1:07:28 PM) comp.lang.ruby If i use something like:
> array.count rescue array.size
does the rescue set up anything internally that will make this
inefficient ?
I have other options too, however, i want to minimize code clut... R
Inheritance related problem19104 (1/31/2010 7:44:36 AM) comp.lang.ruby Note: this is *not* a ruby bug. its a general query.
Perhaps best explained with sample code.
#!/usr/bin/env ruby -w
class Parent
def printa arg
puts "inside parent printa #{arg} "
print... R
Son of 10 things! (1.8 to 1.9 transition)827 (1/16/2009 2:21:07 PM) comp.lang.ruby Hi -- I've posted an update to my recent "10 things to be aware of" post about the Ruby 1.8 to 1.9 transition: http://dablog.rubypal.com/2009/1/16/son-of-10-things-to-be-aware-of-in-ruby-1-9 It includes some... dblack(1323)
String doesnt auto dup on modification3422 (1/21/2009 7:15:53 PM) comp.lang.ruby I'm writing my first largeish app. One issue that gets me frequently is this: I define a string in one class. Some other class references it, and modifies it. I (somehow) expected that when another referer mod... sentinel.2001(154)