First  |  Prev |  Next  |  Last
Pages: 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151
How to duplicate elements in array?
Hi, something I couldn't quite figure out (sorry for posting so soon after my last question)... a = [["ABC", "30", "1"]] I want to duplicate/copy the element. This is what I'm trying to get: a2 = [["ABC", "30", "1"], ["ABC", "30", "1"]] What I did was simply a2 = a + a => [["ABC", "30", "1"], ["AB... 3 Jul 2008 21:45
Reading stdout & stderr from a pipe with popen3
I originally posted this to a Ruby forum at railsforum.com, but I just found this list so thought I'd try here since I haven't gotten a response at railsforum. OK...so I'm using popen3 to run some command line stuff and be able to get back stdout/stderr... $cmdin, $cmdout, $cmderr = Open3.popen3("zmprov") ... 17 Jul 2008 15:48
Parameter name reflection
If I declare def foo(a, b) end What code should I use to find the names of the parameters? I only see these methods available on a Method object. ["[]", "arity", "call", "to_proc", "unbind"] For instance in PHP I could do this function foo($a, $b) { } $ref = new ReflectionFunction('foo') $ref->getParam... 5 Jul 2008 19:40
Is this a YAML problem, and How do I fix it?
I was doing my merry thing, slowly learning ralis by doing some tutorials, and then this happened: => Ctrl-C to shutdown server ** Starting Mongrel listening at 0.0.0.0:3000 ** Starting Rails with development environment... Exiting /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/yaml.rb:... 3 Jul 2008 16:37
Beginner: Add/merge arrays
Hi, just started working with Ruby (and, well, programming in general :-)... I have two arrays in Ruby that I'd like to merge: Array 1: ["7.99", "6.99", "10.99", "5.97"] Array 2: [["A", "5"], ["B", "5"], ["C", "4"], ["D", "5"]] I want to merge those two arrays and as a result get Array 3: [["A", "5",... 3 Jul 2008 15:36
Unhandled listen loop exception - InstantRails 2.0
[Note: parts of this message were removed to make it a legal post.] Greetings, I've downloaded InstantRails 2.0. Run it (with default server and dbase) Created new project, run "Start with Mongrel" and tried to access it through http://localhost:port/ Unfortunatelly It returns: Unhandled listen loo... 3 Jul 2008 13:32
Rawr install error
[Note: parts of this message were removed to make it a legal post.] Greetings, using: rawr install -d path_to_project gives following output: rawr.rb:133: uninitialized constant Rawr::Generator(NameError) Any suggestions ?? Thank You ... 3 Jul 2008 13:32
[SUMMARY] Statistician I (#167)
[Note: parts of this message were removed to make it a legal post.] The heart of this problem, as suggested in the quiz description, is pattern matching. Essentially, we want to turn user-created rules into Ruby regular expressions, or at least some other method for comparing data against those rules. I'll co... 3 Jul 2008 13:32
[ANN] Logging 0.8.0
logging version 0.8.0 by Tim Pease http://logging.rubyforge.org/ == DESCRIPTION Logging is a flexible logging library for use in Ruby programs based on the design of Java's log4j library. It features a hierarchical logging system, custom level names, multiple output destinations per log event,... 3 Jul 2008 13:32
Check version
How do I check what version of Ruby I have, besides ruby -v? I'm trying to figure out what version of 1.8.6 I have. -- Posted via http://www.ruby-forum.com/. ... 3 Jul 2008 13:32
First  |  Prev |  Next  |  Last
Pages: 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151