This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 7d0e281d713b2f0c70b57206a9388d9cbe158e6e Mon Sep 17 00:00:00 2001 | |
From: Douglas Campos <[email protected]> | |
Date: Tue, 7 Jun 2011 20:49:30 -0300 | |
Subject: [PATCH] allowing blocks with arity > 2 | |
--- | |
src/org/jruby/RubyEnumerable.java | 8 +++++++- | |
1 files changed, 7 insertions(+), 1 deletions(-) | |
diff --git a/src/org/jruby/RubyEnumerable.java b/src/org/jruby/RubyEnumerable.java |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
qmx@gondor ~/tmp » jruby threads.rb | |
starting thread 1 | |
starting thread 0 | |
starting thread 2 | |
starting thread 3 | |
starting thread 4 | |
ending thread 2 | |
ending thread 3 | |
ending thread 1 | |
ending thread 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'java' | |
x = java.util.concurrent.Executors.new_cached_thread_pool | |
x.execute { puts "hello" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruby-1.8.7-p352 :001 > def one_arg(a); puts "one"; end | |
=> nil | |
ruby-1.8.7-p352 :002 > def one_arg(a,b); puts "two"; end | |
=> nil | |
ruby-1.8.7-p352 :003 > one_arg(1) | |
ArgumentError: wrong number of arguments (1 for 2) | |
from (irb):3:in `evaluate' | |
from org/jruby/RubyKernel.java:1011:in `eval' | |
from /Volumes/v2/git/jruby/lib/ruby/1.8/irb.rb:158:in `eval_input' | |
from /Volumes/v2/git/jruby/lib/ruby/1.8/irb.rb:271:in `signal_status' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyTest { | |
public void test(){} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Originally: | |
https://gist.github.com/7565976a89d5da1511ce | |
Hi Donald (and Martin), | |
Thanks for pinging me; it's nice to know Typesafe is keeping tabs on this, and I | |
appreciate the tone. This is a Yegge-long response, but given that you and | |
Martin are the two people best-situated to do anything about this, I'd rather | |
err on the side of giving you too much to think about. I realize I'm being very | |
critical of something in which you've invested a great deal (both financially |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
I've wrapped Makoto Matsumoto and Takuji Nishimura's code in a namespace | |
so it's better encapsulated. Now you can have multiple random number generators | |
and they won't stomp all over eachother's state. | |
If you want to use this as a substitute for Math.random(), use the random() | |
method like so: | |
var m = new MersenneTwister(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jruby 1.7.0.dev (ruby-1.9.3-p28) (2012-01-29 60a764e) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_29) [darwin-x86_64-java] | |
["0.9", "74080"] | |
["1.1", "90516"] | |
["1.1", "90520"] | |
["1.1", "95176"] | |
["1.1", "95240"] | |
["1.2", "99816"] | |
["1.2", "99960"] | |
["1.2", "104496"] | |
["1.2", "104352"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAgEA6qifkgtTFMK81wuUZPDyVfI06xdFdqPwJCu9MdvKQlTB5orCbWgaXbcqrA1iYjMceCMUKZY+jBSQZNvxq6nMB6fXXAKEd5mS5fnuPts5SZE3yWl123NOPZs7pqYDoYJbVYiQ2NLyKT+gszX5mvYsXR3UrohhHMwyyD1MafSUPLlbefCa5NLfYKcmilj8qDlepSz9R8sPfdyWWUXsKcIoD4o3L774c5gmSs7KFPY+eVgDayfjf+MoAUPtGArawusZyCrmfS7OfOy5fVK8oaN0iZFttTU78Z6o2SdAiNgdQMk9Ed1MPjqnWBwko+VcNWiMijqPPQloNRHTr3vtV8w6UB1O9ewpLdBjkdDoEXncZiLAsqU863zW4Sz5QVUSuU0UmC0SR7tjfWv18ZBAjDWmayfl8oY6ojmOK72W6YGHpRkd6NQWKR+h8hc2HUCznTTGFBY34pcGQRGj2jyclU3eabMBvOGB3orVtBYP9XSSdw89RNumhGQ6iJiLrk+Rjp0BxzVvHZnOB/i3aayL6dbOUS22IO23nn/QoduQ/ft6hlMhvOduakqRflt8dKLvujDIUSs9q+tNBja8mXig+b0f/cuTB1zB05hequXyk7z46n/Ynuc/8BDq77wZloQl4/eG8N5oFQj1nQQ+8+C+THp19EltwkWvfZjRfrBmGp+vDR0= [email protected] |