Can't change the value of self - II [Note: parts of this message were removed to make it a legal post.] I'm still not "getting it." Consider - - - class DirectoryString < String def initialize(arg) super arg end def convert_forward_slash_to_back_slash self.gsub(/\//, "\\") end def convert_forward_slash_to_back_s... 12 Aug 2010 04:56
syntax error, unexpected '}', expecting kEND I'm using ruby 1.8.6 (2010-02-04 patchlevel 398) [i386-mingw32], WinXP and Notepad++ in the Unix mode (for line endings) I have the following code: q = [1.0, 4.0, 10.0, 27.0, 50.0, 600.0, 1000.0, 5833.0, 6250.0, 1500000.0] x = q.each{|e| print Math.log10(e).to_i, " "} p x r = q.collect{|e| Math.log10(e).to_i... 11 Aug 2010 19:08
Ruby is in Grave Danger! Dear Friends, I have received an ominous message from the future. We should take this seriously, as it could determine the fate of our Ruby lives as we know them! Decrypted future-message below: --- The evil #COBOTS have taken over the programming world and aim to rule it with an iron fist. The #COBOTS... 13 Aug 2010 14:39
String#to_r (was: "NaN".to_f revisited) On Aug 11, 2010, at 11:28 AM, Fela Winkelmolen wrote: Might give some strange behaviour though: "1$".to_f => 1.0 "nonsense".to_f => 0.0 "nanotubes".to_f => Nan ? "inferiority".to_f => Inf ? well, it's not so much "stranger" than the following I suppose "24... 11 Aug 2010 12:32
Safari display problems Hello, my problem today is not directly linked to Ruby (well, don't think so at least). I'm developping a website using RubyOnRails framework. Everythings works just fine with IE and FF but in Safari some code is displayed, unpredictably and without any logic (sometimes the page is displayed correctly and as expect... 11 Aug 2010 16:55
injecting an instance method into another class' class method I'd like to reopen a class Foo and redefine one of its methods to use an instance method from class Bar. I can't seem to figure out how to do it or even if it is possible. I tried lots of different techniques and none have worked, so here I am asking for a bit of help. An example of one of the techniques I tried is ... 12 Aug 2010 15:52
cucumber Hi All, I am using ruby+watir for agile testing since long time. I was trying to use cucumber . As I am new to Cucumber so can anyone please guide me step by step how to run a sample cucumber test. if this is not the correct forum where i should put this question then please suggest me the best forum where i c... 11 Aug 2010 11:26
how to develop a chat server with Ruby? Do you have any example for reference? Thanks.... 11 Aug 2010 20:14
how to develop a chat server with Ruby? Google 'eventmachine chat server' then look at the first link. It would have taken less typing than posting your question and given you the answer there and then. ... 11 Aug 2010 04:55
assignment question Kaye Ng wrote: #Run this code x=[2,6,5,9] y = x puts x puts puts y puts x=[1,2,3,4] puts x puts puts y ------------------------------------- #this also x=[2,6,5,9] y = x puts x puts puts y puts x.pop puts x puts puts y -------------... 11 Aug 2010 07:05 |