where's rake?530 (10/7/2007 8:45:40 PM) comp.lang.ruby I installed rubygems, and I got help output when I issued the command: $ gem help so I think ruby gems installed correctly. But when I tried to install the Rake gem, this was the output: $ gem install -r ra... 7stud
unit testing: example p. 156 pickaxe2236 (9/29/2007 1:02:17 PM) comp.lang.ruby How do you make this example fail: require "test/unit" class TestsWhichFail < Test::Unit::TestCase def test_reading assert_not_nil(ARGF.read, "Read next line of input") end end I tried specifying an... 7stud
thread switching? (p. 144 pickaxe2)123 (9/20/2007 4:19:30 AM) comp.lang.ruby Hi, On p. 144 in pickaxe2, there are two examples using threads(see below). Each thread updates a counter, and the function call that updates the counter is synchronized to prevent simultaneous axis to the cou... 7stud
retrieving yahoo! mail ?140 (9/17/2007 11:30:17 PM) comp.lang.ruby Hi, As an exercise, I'm trying to use Net::HTTP to retrieve my yahoo mail. I looked at the source html for the yahoo mail login page at: https://login.yahoo.com/config/mail?.intl=us On that page is a form wi... 7stud
posting form data in ruby 1.8.2?227 (9/16/2007 10:40:52 AM) comp.lang.ruby Hi, I'm trying to figure out how to post form data to a url, but the methods used in the examples in the Net::HTTP docs use methods that aren't available in my ruby install: Posting Form Data: require '... 7stud
rand() v. rand(0.1) ?522 (9/15/2007 10:37:58 AM) comp.lang.ruby Is there any difference between calling rand() and rand(0.1)? -- Posted via http://www.ruby-forum.com/. ... 7stud
screen scraping programaticprogrammer.com ?341 (9/13/2007 12:39:52 PM) comp.lang.ruby The following is from "Programming Ruby 2nd" p.133: ---- require "net/http" h = Net::HTTP.new("www.programaticprogrammer.com", 80) response = h.get("/index.html") if response.message == "OK" puts response... 7stud
what is this syntax: \001\002 ?1338 (9/12/2007 11:10:51 AM) comp.lang.ruby Hi, On p. 131-132 in "Programming Ruby 2d.", it talks about writing binary data to files, but there's no explanation of the syntax: str1 = "\001\002\003" I looked in the index of the book, I poured over "The... 7stud
module_function :func vs. MyModule.func?1326 (9/9/2007 5:54:54 AM) comp.lang.ruby The following produce the same output: module MyModule def greet puts "hello" end module_function :greet end MyModule.greet #-----vs.----------- module MyModule def MyModule.greet ... 7stud
Hash.new with a block?518 (9/3/2007 4:50:13 AM) comp.lang.ruby Hi, In the code: h = Hash.new {|hash, key| hash[key] = []} what method is yielding the values hash, key to the code block? It doesn't seem like it could be new() since new() isn't called when you lookup a k... 7stud
Multitasking and collecting results319 (10/7/2007 5:57:44 AM) comp.lang.ruby (new to ruby) I have a routine that makes a web call then does some work. I need to do many of these, and because of latency and all that, I want to go ahead and spawn several of these in async "tasks" (trying... lists5799(97)
newbie... be gentle226 (10/7/2007 3:56:57 PM) comp.lang.ruby I am trying to access the US Postal Service web tool for tracking. I am new to Ruby and web programming in general so if this is a really stupid question I apologize in advance. According to their site the if ... beatrice_martin2001(1)
where's rake?530 (10/7/2007 8:45:40 PM) comp.lang.ruby I installed rubygems, and I got help output when I issued the command: $ gem help so I think ruby gems installed correctly. But when I tried to install the Rake gem, this was the output: $ gem install -r ra... dolgun(237)
memory leakage #2240 (10/8/2007 9:24:39 AM) comp.lang.ruby Hi, Is there a problem of memory leakage in Rails application? How can i get the information about if it is happening in my application? Can i control it? Thanks, Pragati ... pragati.agarwal(2)
optparse and required switches516 (10/8/2007 2:17:47 PM) comp.lang.ruby Hi ... Im lost with optparse. Got a couple of questions if its OK. 1. I've been reading the documentation but I cant get it into my thick head how I tell an option that it is required or optional? I guess al... g00nz(3)
parts of speech in Ruby1231 (10/8/2007 9:44:18 PM) comp.lang.ruby I'm curious -- exactly what class of syntactic element is `=` in Ruby, where "class of syntactic element" is roughly analogous to "part of speech". If objects are nouns and methods are verbs, that means `=` is... perrin(1253)
thread problem.....427 (10/9/2007 3:04:30 AM) comp.lang.ruby i want to make a program code ,but it ll take long time to execute so i am spiliting my program into thread .... but the general concept about thread is ,it will reduce the execution time of our program under ... bad_good_lion(72)
what does print call internally?1326 (10/10/2007 10:31:18 PM) comp.lang.ruby irb(main):001:0> puts nil nil => nil irb(main):002:0> print nil nil=> nil irb(main):003:0> class NilClass irb(main):004:1> def inspect irb(main):005:2> "foo" irb(main):006:2> end irb(main):007:1> end => foo irb... martindemello(818)
|how do you know when to put a variable between pipes?|327 (10/11/2007 1:26:46 AM) comp.lang.ruby Hi i am at about page fifty in the pickaxe book, and i have a question. I see a lot of examples of a block that starts with | SomeVar| and I dont really understand how you know when you can do this or what the... wetlife(2)