First
|
Prev |
Next
|
Last
Pages: 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
Download version 1.8? Where can I download the latest version of the 1.8 branch? I need to deploy puppet and it doesn't run on 1.9 yet :( -- Posted via http://www.ruby-forum.com/. ... 5 May 2010 14:53
Scope I have a script with those two following classes: class String def to_b ["true"].include?(self.downcase) end end class HereIWantUseToB "string".to_b end Ok, that works fine, the to_b method can be "seen" by HereIWantToUseToB class. But I wanted to those two classes inside another class,... 4 May 2010 15:40
Calculation in a block Hi, I'm new to ruby, and I am trying to add all the natural numbers below one thousand that are multiples of 3 or 5. (exercise from ProjectEuler) Here's my code: class Array def sumNumbers sum = 0 self.each_with_index { |n, i| if ((self[i] % 3) == 0 || (self[i] % 5) == 0) sum += self[... 12 May 2010 20:19
Something I expected to work, but didn't! irb(main):001:0> x = 2 => 2 irb(main):002:0> y = 4 => 4 irb(main):003:0> x, y *= 2 SyntaxError: (irb):3: syntax error, unexpected tOP_ASGN, expecting '=' x, y *= 2 ^ from /usr/local/bin/irb:12:in `<main>' :( -- Posted via http://www.ruby-forum.com/. ... 4 May 2010 12:18
* splat error Hello, i need some help here, when i run the following code i get the error below. Why is that, according to the textbook it should work, also looked it up in the cookbook, no luck there too. Thanks in advance. def split_apart(first, *splat, last) puts "first: #{first.inspect}, splat: #{splat.inspect}, " + ... 4 May 2010 19:04
Ocra-fied exe doesn't trace with set_trace_func set_trace_func does not seem to work in an ocra executable -- the proc specified for tracing seems simply not to execute. The tracing works fine when running under straight ruby and under NetBeans, but not with the ocra-fied exe. I'm doing this, by the way, because the ocra-fied exe crashes someplace for a clie... 4 May 2010 08:58
Is there likely to be any problem with an embedded assert statement like this? On May 3, 4:07 pm, Xeno Campanoli / Eskimo North and Gmail <xeno.campan...(a)gmail.com> wrote: class BaseMenuUnitTests < Test::Unit::TestCase def test_validateNavId assert_nothing_raised(Exception) { navid = validateNavId(NavTrac,"test_validNavId") assert(nav... 3 May 2010 18:42
[ANN] MacRuby 0.6 Hi, After 3 months of development since the last release, MacRuby 0.6 is now available. Get it here while it's still hot! MacRuby is an implementation of Ruby 1.9 directly on top of Mac OS X core technologies such as the Objective-C runtime and garbage collector, the LLVM compiler infrastructure and the Founda... 3 May 2010 18:42
Help decoding UDPSocket trap data Hi guys, I know that isn't the thread to ask this, but this is the closest I got after reading the forum for several hours. I am trying to use the trap listener and had no success so far. I have no clue about what is going on here. My code so far: require 'rubygems' require 'snmp' require 'logger' ... 4 May 2010 10:04
Is there likely to be any problem with an embedded assert statementlike this? class BaseMenuUnitTests < Test::Unit::TestCase def test_validateNavId assert_nothing_raised(Exception) { navid = validateNavId(NavTrac,"test_validNavId") assert(navid == NavTrac, "validateNavId Return value '#{navid}' differs from object validated (#{NavTrac}).") ... 3 May 2010 16:27 |