First  |  Prev |  Next  |  Last
Pages: 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
Weird hash key: what am I asking Ruby to do?
I decided to type the following in irb: irb(main):010:0> a = {} => {} irb(main):015:0> a[lambda { x } => 5] = 5 => 5 irb(main):016:0> a => {{#<Proc:0x028cb304@(irb):15>=>5}=>5} irb(main):017:0> a = {} => {} irb(main):018:0> a[lambda { x } ] = 5 => 5 irb(main):019:0> a => {#<Proc:0x028c2a4c@(irb):18>=>5} ... 31 Mar 2010 17:41
Weird hash key: what am I asking Ruby to do?
[Note: parts of this message were removed to make it a legal post.] On Wed, Mar 31, 2010 at 12:32 PM, Aldric Giacomoni <aldric(a)trevoke.net>wrote: I decided to type the following in irb: irb(main):010:0> a = {} => {} irb(main):015:0> a[lambda { x } => 5] = 5 => 5 irb(main):016:0> a => {{#<Proc... 1 Apr 2010 11:14
Post-Condition if Statements And NameErrors
I thought this was odd: def bs 1 end print y + 1 if y = bs NameError: undefined local variable or method `y' for main:Object And, of course, the multi-line if works: if x = bs print x + 1 end ... 1 Apr 2010 13:29
trap(:INT); system(); STDIN.gets(); ^C
Considering a trivial example: trap :INT do puts puts 'Bye' exit end # system 'date' print 'Say something: ' STDOUT.flush puts "You said: #{STDIN.gets}" When prompted to say something, hitting Ctrl+C will call trap(:INT) block. However, after uncommenting line 7, Ctrl+C won't cause a call to... 1 Apr 2010 14:37
Net::SSH - request a pty seems to put stderr in stdout
Hi all, As context, we're simply trying to remotely (automatically) "su" to a different user and issue commands as that user, while still being able to differentiate between stderr and stdout on the subsequent commands. If there's a common pattern for doing this, then answering my specific question isn't all t... 31 Mar 2010 14:20
connects to .NET wsdl
Hi, What's the correct module and method for making connection to .NET wsdl from a linux OS? Thanks. -pack __________________________________________________ Do You Yahoo!? Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. http://mail.yahoo.com ... 31 Mar 2010 12:05
Playing Games with "Ruids"
ok, some clarity arrived: for trivial games one "helperclass" each. one '?'method per potential move. chess would require maybe 6 helper classes or so. the "ruids" play n play players. the swarms are organized differently than i have done but no big deal. each swarm would handle a new move by any player. ... 1 Apr 2010 23:33
Pop Quiz: aliasing versus wrapping
Below are two files that differ only in the 2nd line of code in each. Can you guess what difference they will reveal? I must admit I was surprised when I ran into this. $ cat alias.rb class Object alias_method :to_js, :inspect end class Array def to_js; "[#{map{|o|o.to_js}.join(',')}]"; end ... 31 Mar 2010 10:57
Error in Starling on Windows..
- Windows7 d:\> ruby -v ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32] d:\> starling --version Starling 0.10.0 d:\> gem search eventmachine eventmachine (0.12.10) ------------------------------------------------------------- Errno::EBADF: Bad file descriptor - /var/spool/starling/test in 'writ... 31 Mar 2010 05:26
Need help installing ruby and libraries
Hello everybody... I want to install Redmine Project Management in my PC (Windows XP), whose requirement is Ruby On Rails. So I need to install Ruby on my machine and it is at that point where I've got my first problems. Other requirements of Redmine are RubyGems 1.3.1 and Rake 0.8.3. Well, First, I have dow... 31 Mar 2010 18:49
First  |  Prev |  Next  |  Last
Pages: 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144