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
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
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
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
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
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
Compiled from "ClosureTest.java" | |
final class ClosureTest$1 implements ClosureTest$Closure { | |
final java.lang.Object val$o; | |
ClosureTest$1(java.lang.Object); | |
Code: | |
0: aload_0 | |
1: aload_1 | |
2: putfield #1 // Field val$o:Ljava/lang/Object; | |
5: aload_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
source :rubygems | |
gem 'sinatra', '1.2.3' | |
gem 'tilt', "1.3" | |
gem 'rack', "1.2.2" | |
gem 'sinatra-respond_to', '0.7.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
// first iteration: simple guard by version string | |
if(isRubyVersion("1.9.2-p136")){ | |
// .... | |
} | |
// second iteration: Version object with semantic versioning, etc | |
RubyVersion v = version("1.9.2-p136"); | |
v.major() // 1.9 | |
v.minor() // 2 |