File.open options hash "mode" as int658 (5/17/2011 6:22:41 PM) comp.lang.ruby Hello. in 1.9.x, I see that these work: File.open('yo', 'w') File.open('yo', File::WRONLY|File::TRUNC|File::CREAT) File.open('yo', :mode => 'w') So shouldn't this also work? >> File.open('yo', :mode => File:... Roger
[ANN] faster_require 0.9.2471 (5/11/2011 12:32:03 AM) comp.lang.ruby Hello all. Pleased to announce another update of the faster_require gem, which makes loading ruby scripts far far faster in windows. Halve your rails apps' load/startup time! Enjoy. -r https://github.com/rdp/... Roger
Enumerable#find returns an enumerator?1259 (5/10/2011 6:48:06 PM) comp.lang.ruby Hello all. I would have expected that [1,2,3].find(3) just return me the element 3, not an enumerator, since it will at most return me one item, so it doesn't seem very "enumerable" to me (at most one item). ... Roger
[ANN] ruby-prof 0.10.5487 (4/25/2011 9:53:28 PM) comp.lang.ruby Pleased to announce ruby-prof gem's 0.10.5 Recent fixes: *New graph outputter call stack, with cool collapsible elements ex: http://rogerdpack.t28.net/dev/ruby-prof/examples/stack.html * It can now profile ... Roger
double singleton?376 (3/9/2011 8:32:04 PM) comp.lang.ruby Hello all. Noticed this behavior: >> require 'singleton' => true >> class A; include Singleton; end => A >> A.instance => # >> class A; include Singleton; end => A >> A.instance => # A second singleton? Che... Roger
windows system("@rem") behavior1153 (2/10/2011 8:54:43 PM) comp.lang.ruby Hello all.
Noticed this in doze:
>> system("rem echo 3")
which is expected, I think (rem makes it passed out to dos, dos ignores
Then this also occurs:
>> system("@rem echo 3")... Roger
[ANN] sensible-cinema 0.10.1 released0199 (10/14/2010 7:51:29 PM) comp.lang.ruby Hello all.
I'm not sure why, but my previous release message of "sensible-cinema"
(currently a gem that works on jruby) was lost.
Anyway, here's the original if anybody wants to read about it.
RCR: String#contain? and Array#contain?3190 (9/23/2010 8:32:46 PM) comp.lang.ruby Every time I have to guess from memory whether to use "contain?" or
"include?" within arrays and strings, I always guess wrong (the right
answer is only "include?" BTW).
Since ruby typically allows multiple ... Roger
ambiguous first argument?4254 (8/19/2010 12:39:13 AM) comp.lang.ruby Hi all.
With this code:
I get this warning:
test.rb:1: warning: ambiguous first argument; put parentheses or even
Could somebody please help me to understand w... Roger
IO.popen #2262 (8/2/2010 2:01:28 PM) comp.lang.ruby I assume the doc's are "just wrong" when they say you can access an IO.popen with any mode you'd like? http://ruby-doc.org/core/classes/IO.html#M002242 >> IO.popen("gocr", "rw") ArgumentError: invalid access ... Roger
[ANN] rubygems-update 1.8.0592 (5/4/2011 9:40:12 PM) comp.lang.ruby rubygems-update version 1.8.0 has been released! * * * * * RubyGems is a package management framework for Ruby. This gem is an update for the RubyGems software. You must have an installation of RubyGems... drbrain(2203)
[ANN] faster_require 0.9.2471 (5/11/2011 12:32:03 AM) comp.lang.ruby Hello all. Pleased to announce another update of the faster_require gem, which makes loading ruby scripts far far faster in windows. Halve your rails apps' load/startup time! Enjoy. -r https://github.com/rdp/... rogerpack2005(1307)
[ANN] rubygems-update 1.8.2 Released578 (5/12/2011 12:54:26 AM) comp.lang.ruby rubygems-update version 1.8.2 has been released! * * * * * RubyGems is a package management framework for Ruby. This gem is an update for the RubyGems software. You must have an installation of RubyGems... drbrain(2203)
Shell pipeline in Ruby?1961 (5/12/2011 4:05:59 PM) comp.lang.ruby Hello, how do you write an equivalent of $ cmdA | cmdB | cmdC in Ruby? Specifically, I would like to see the PID, return value and stderr of each of these commands but I would like cmdB to read the stdout o... hramrach(368)
ruby.exe crashing on windows xp1476 (5/13/2011 5:31:14 AM) comp.lang.ruby Hi there, I am using ruby 1.9.2p180 and with rails 3.0 but I am getting ruby.exe to crash fairly often. I understand this is a ruby forum over rails yet I do not know what is the culprit. I have seen Rails 3... glory.lo778(6)
Ruby socket does not get reply786 (5/13/2011 5:19:53 PM) comp.lang.ruby Hi all, I use a TCP connection and send some data like this: begin session = "mysession" socket = TCPSocket.new(tcpaddress, port) socket.setsockopt(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1) ... rob_gar_esp(3)
Ruby to C#185 (5/25/2011 9:46:14 PM) comp.lang.ruby could someone explain how to parse the exploit ms08_067_netapi.rb to C# http://packetstormsecurity.org/files/view/71322/ms08_067_netapi.rb.txt in college we were asked in the course of computer security to do... jheto2002(1)
ruby fork (thread like) on windows280 (5/26/2011 11:04:57 PM) comp.lang.ruby Hi All, I'm trying to upload a number of large files to s3. I want to do this in parallel using threads, but it looks like the s3 gems for windows aren't thread safe. I then started looking into fork. Memor... adamlauper(6)