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
def initialize(composite, model) | |
@composite, @model = composite, model | |
tree_style = Swt::SWT::MULTI | |
@viewer = JFace::Viewers::TreeViewer.new(@composite, tree_style) | |
grid_data = Swt::Layout::GridData.new | |
grid_data.grabExcessHorizontalSpace = true | |
grid_data.horizontalAlignment = Swt::Layout::GridData::FILL | |
grid_data.grabExcessVerticalSpace = true | |
grid_data.verticalAlignment = Swt::Layout::GridData::FILL | |
@viewer.get_tree.set_layout_data(grid_data) |
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
diff --git a/cext/src/include/ruby/ruby.h b/cext/src/include/ruby/ruby.h | |
index 7e97f11..b17a9db 100644 | |
--- a/cext/src/include/ruby/ruby.h | |
+++ b/cext/src/include/ruby/ruby.h | |
@@ -1001,6 +1001,8 @@ RUBY_DLLSPEC extern VALUE rb_eLoadError; | |
#define ALLOCA_N(type,n) (type*)alloca(sizeof(type)*(n)) | |
+#define RUBY_METHOD_FUNC(func) ((VALUE (*)(ANYARGS))func) | |
+ |
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
diff --git a/lib/ext/melbourne/bstrlib.c b/lib/ext/melbourne/bstrlib.c | |
index a30f1ec..3ea0d7d 100644 | |
--- a/lib/ext/melbourne/bstrlib.c | |
+++ b/lib/ext/melbourne/bstrlib.c | |
@@ -2707,7 +2707,7 @@ struct genBstrList g; | |
#ifdef __GNUC__ | |
/* Something is making gcc complain about this prototype not being here, so | |
I've just gone ahead and put it in. */ | |
-extern int vsnprintf (char *buf, size_t count, const char *format, va_list arg); | |
+// extern int vsnprintf (char *buf, size_t count, const char *format, va_list arg); |
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
diff --git a/cext/src/JUtil.cpp b/cext/src/JUtil.cpp | |
index 04d9905..573b706 100644 | |
--- a/cext/src/JUtil.cpp | |
+++ b/cext/src/JUtil.cpp | |
@@ -44,6 +44,22 @@ jruby::getCurrentEnv() | |
return env; | |
} | |
+extern "C" { | |
+JavaVM* jruby_jvm; |
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
diff --git a/Rakefile b/Rakefile | |
index 3f9b8ef..27606ba 100644 | |
--- a/Rakefile | |
+++ b/Rakefile | |
@@ -21,6 +21,13 @@ file jruby_ruboto_jar => generated_libs do | |
ant.zip(:destfile=>jruby_ruboto_jar) do | |
zipfileset(:src=>jruby_jar) do | |
exclude(:name=>'jni/**') | |
+ exclude(:name=>'org/jruby/ant/**') | |
+ exclude(:name=>'org/jruby/compiler/ir/**') |
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
~/projects/jruby ➔ jruby -e 'me = nil; loop { Thread.new { me = Thread.current; Thread.main.raise("me changed!") if me != Thread.current } }' | |
-e:1:in `loop': me changed! (RuntimeError) | |
from -e:1 |
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
diff --git a/library/date/strptime_spec.rb b/library/date/strptime_spec.rb | |
index 051da94..e7a18d3 100644 | |
--- a/library/date/strptime_spec.rb | |
+++ b/library/date/strptime_spec.rb | |
@@ -78,9 +78,8 @@ describe "Date#strptime" do | |
end | |
it "should be able to show the week number with the week starting on sunday and monday" do | |
- d = Date.today | |
- Date.strptime("14", "%U").should == Date.commercial(d.cwyear, d.cweek, 7) + 7 * 13 |
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
~/projects/jruby ➔ jirb | |
irb(main):001:0> require 'java' | |
=> true | |
irb(main):002:0> 'foo'.to_java.class | |
=> Java::JavaLang::String | |
irb(main):003:0> 1.to_java.class | |
=> Java::JavaLang::Long | |
irb(main):004:0> [1,2,3].to_java.class | |
=> #<Class:01xb95f72> | |
irb(main):005:0> Object.new.to_java.class |
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
~/projects/jruby ➔ jirb | |
irb(main):001:0> class Object ; def blank?; length == 0; end; end | |
=> nil | |
irb(main):002:0> require 'java' | |
=> true | |
irb(main):003:0> a = java.util.ArrayList.new | |
=> [] | |
irb(main):004:0> a << 1 | |
=> [1] | |
irb(main):005:0> a.blank? |
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
BEFORE: | |
Java 5 client (worst case): | |
user system total real | |
near closure, 1000k x100 gets 5.241000 0.000000 5.241000 ( 5.240000) | |
near closure, 1000k x100 gets and sets 6.342000 0.000000 6.342000 ( 6.342000) | |
in closure, 1000k x100 gets 5.486000 0.000000 5.486000 ( 5.486000) | |
in closure, 1000k x100 gets and sets 7.522000 0.000000 7.522000 ( 7.522000) | |
near closure, 5 vars, 1000k * x100 gets 5.534000 0.000000 5.534000 ( 5.534000) |
NewerOlder