Permalink
Browse files

Merge branch 'master' into codecache

  • Loading branch information...
2 parents 7fee4a2 + ef6c935 commit 79ce62661f08447a75a03efcd710a531e765ff0b @headius headius committed Dec 17, 2009
Showing with 1,509 additions and 413 deletions.
  1. +1 −1 bin/ast
  2. +1 −1 bin/gem.bat
  3. +1 −1 bin/jirb.bat
  4. +1 −1 bin/jirb_swing.bat
  5. +3 −1 bin/jrubyd.bat
  6. +1 −1 bin/rake.bat
  7. +1 −1 bin/rdoc.bat
  8. +1 −1 bin/ri.bat
  9. +14 −5 build.xml
  10. BIN build_lib/jffi-x86_64-Windows.jar
  11. BIN build_lib/jnr-posix.jar
  12. +6 −2 default.build.properties
  13. +1 −1 lib/ruby/1.8/Win32API.rb
  14. +0 −1 lib/ruby/site_ruby/shared/builtin/javasupport.rb
  15. +0 −27 lib/ruby/site_ruby/shared/builtin/javasupport/proxy/interface.rb
  16. +3 −1 lib/ruby/site_ruby/shared/ffi/library.rb
  17. +1 −0 lib/ruby/site_ruby/shared/ffi/times.rb
  18. +1 −1 maven/jruby-complete/pom.xml
  19. +1 −1 maven/jruby/pom.xml
  20. +1 −1 pom.xml
  21. +2 −2 rubyspecs.revision
  22. +3 −5 spec/java_integration/types/coercion_spec.rb
  23. +0 −6 spec/jruby.1.8.mspec
  24. +1 −0 spec/tags/1.8/ruby/core/proc/call_tags.txt
  25. +1 −0 spec/tags/1.8/ruby/core/proc/element_reference_tags.txt
  26. +422 −0 src/org/jruby/BasicObjectStub.java
  27. +3 −0 src/org/jruby/RubyArray.java
  28. +2 −0 src/org/jruby/RubyBignum.java
  29. +4 −0 src/org/jruby/RubyBinding.java
  30. +2 −0 src/org/jruby/RubyBoolean.java
  31. +6 −0 src/org/jruby/RubyClass.java
  32. +2 −0 src/org/jruby/RubyComplex.java
  33. +5 −0 src/org/jruby/RubyContinuation.java
  34. +1 −0 src/org/jruby/RubyConverter.java
  35. +4 −0 src/org/jruby/RubyDir.java
  36. +1 −0 src/org/jruby/RubyEncoding.java
  37. +4 −0 src/org/jruby/RubyException.java
  38. +5 −0 src/org/jruby/RubyFile.java
  39. +3 −0 src/org/jruby/RubyFixnum.java
  40. +3 −0 src/org/jruby/RubyFloat.java
  41. +3 −0 src/org/jruby/RubyHash.java
  42. +4 −0 src/org/jruby/RubyIO.java
  43. +7 −0 src/org/jruby/RubyInstanceConfig.java
  44. +5 −0 src/org/jruby/RubyInteger.java
  45. +1 −12 src/org/jruby/RubyKernel.java
  46. +4 −0 src/org/jruby/RubyMatchData.java
  47. +4 −0 src/org/jruby/RubyMethod.java
  48. +1 −0 src/org/jruby/RubyModule.java
  49. +1 −0 src/org/jruby/RubyNil.java
  50. +5 −1 src/org/jruby/RubyNumeric.java
  51. +2 −1 src/org/jruby/RubyObject.java
  52. +4 −0 src/org/jruby/RubyProc.java
  53. +5 −0 src/org/jruby/RubyRange.java
  54. +2 −0 src/org/jruby/RubyRational.java
  55. +3 −0 src/org/jruby/RubyRegexp.java
  56. +6 −0 src/org/jruby/RubyString.java
  57. +3 −1 src/org/jruby/RubyStruct.java
  58. +1 −0 src/org/jruby/RubySymbol.java
  59. +4 −0 src/org/jruby/RubyThread.java
  60. +3 −0 src/org/jruby/RubyThreadGroup.java
  61. +3 −0 src/org/jruby/RubyTime.java
  62. +4 −0 src/org/jruby/RubyUnboundMethod.java
  63. +120 −0 src/org/jruby/compiler/util/BasicObjectStubGenerator.java
  64. +1 −1 src/org/jruby/ext/ffi/AutoPointer.java
  65. +29 −7 src/org/jruby/ext/ffi/CallbackInfo.java
  66. +1 −1 src/org/jruby/ext/ffi/Platform.java
  67. +1 −1 src/org/jruby/ext/ffi/StructLayout.java
  68. +4 −2 src/org/jruby/ext/ffi/jffi/CallbackManager.java
  69. +3 −1 src/org/jruby/ext/ffi/jffi/DefaultMethodFactory.java
  70. +2 −1 src/org/jruby/ext/ffi/jffi/FFIUtil.java
  71. +2 −1 src/org/jruby/ext/ffi/jffi/Factory.java
  72. +9 −11 src/org/jruby/ext/ffi/jffi/JFFIInvoker.java
  73. +1 −1 src/org/jruby/ext/ffi/jffi/VariadicInvoker.java
  74. +368 −45 src/org/jruby/java/MiniJava.java
  75. +0 −1 src/org/jruby/java/proxies/ConcreteJavaProxy.java
  76. +23 −29 src/org/jruby/java/proxies/InterfaceJavaProxy.java
  77. +175 −188 src/org/jruby/java/proxies/JavaInterfaceTemplate.java
  78. +94 −22 src/org/jruby/javasupport/Java.java
  79. +3 −0 src/org/jruby/javasupport/JavaClass.java
  80. +1 −1 src/org/jruby/javasupport/JavaConstructor.java
  81. +0 −11 src/org/jruby/javasupport/JavaSupport.java
  82. +9 −5 src/org/jruby/javasupport/util/RuntimeHelpers.java
  83. +7 −7 src/org/jruby/jruby.properties
  84. +1 −0 src/org/jruby/libraries/RbConfigLibrary.java
  85. +13 −1 src/org/jruby/runtime/ClassIndex.java
  86. +38 −0 src/org/jruby/runtime/builtin/RubyJavaObject.java
  87. +6 −0 src/org/jruby/util/CodegenUtils.java
  88. +11 −0 test/test_kernel.rb
View
@@ -59,7 +59,7 @@ end
if ARGV.length > 1
puts "You may only specify one script (see --help)"
exit 0
-elsif ARGV == 1
+elsif ARGV.length == 1
if expression
puts "-e and a script is not a valid combination (see --help)"
exit 0
View
@@ -3,4 +3,4 @@ IF NOT "%~f0" == "~f0" GOTO :WinNT
@"jruby" -S "gem" %1 %2 %3 %4 %5 %6 %7 %8 %9
GOTO :EOF
:WinNT
-@"jruby" "%~dpn0" %*
+@"%~dp0jruby.exe" "%~dpn0" %*
View
@@ -3,4 +3,4 @@ IF NOT "%~f0" == "~f0" GOTO :WinNT
@"jruby" -S "jirb" %1 %2 %3 %4 %5 %6 %7 %8 %9
GOTO :EOF
:WinNT
-@"jruby" "%~dpn0" %*
+@"%~dp0jruby.exe" "%~dpn0" %*
View
@@ -3,4 +3,4 @@ IF NOT "%~f0" == "~f0" GOTO :WinNT
@"jruby" -S "jirb_swing" %1 %2 %3 %4 %5 %6 %7 %8 %9
GOTO :EOF
:WinNT
-@"jruby" "%~dpn0" %*
+@"%~dp0jruby.exe" "%~dpn0" %*
View
@@ -1,7 +1,9 @@
@ECHO OFF
+
@set debug_args=-J-Xdebug -J-Xrunjdwp:transport=dt_shmem,server=y,suspend=y
+
IF NOT "%~f0" == "~f0" GOTO :WinNT
@"jruby.exe" %debug_args% %1 %2 %3 %4 %5 %6 %7 %8 %9
GOTO :EOF
:WinNT
-@"jruby.exe" %debug_args% "%~dpn0" %*
+@"%~dp0jruby.exe" %debug_args% "%~dpn0" %*
View
@@ -3,4 +3,4 @@ IF NOT "%~f0" == "~f0" GOTO :WinNT
@"jruby" -S "rake" %1 %2 %3 %4 %5 %6 %7 %8 %9
GOTO :EOF
:WinNT
-@"jruby" "%~dpn0" %*
+@"%~dp0jruby.exe" "%~dpn0" %*
View
@@ -3,4 +3,4 @@ IF NOT "%~f0" == "~f0" GOTO :WinNT
@"jruby" -S "rdoc" %1 %2 %3 %4 %5 %6 %7 %8 %9
GOTO :EOF
:WinNT
-@"jruby" "%~dpn0" %*
+@"%~dp0jruby.exe" "%~dpn0" %*
View
@@ -3,4 +3,4 @@ IF NOT "%~f0" == "~f0" GOTO :WinNT
@"jruby" -S "ri" %1 %2 %3 %4 %5 %6 %7 %8 %9
GOTO :EOF
:WinNT
-@"jruby" "%~dpn0" %*
+@"%~dp0jruby.exe" "%~dpn0" %*
View
@@ -147,10 +147,17 @@
<include name="**/*.properties"/>
</fileset>
<filterset>
- <filter token="os.arch" value="${os.arch}"/>
+ <filter token="version.ruby.major" value="${version.ruby.major}"/>
+ <filter token="version.ruby" value="${version.ruby}"/>
+ <filter token="version.ruby.patchlevel" value="${version.ruby.patchlevel}"/>
+ <filter token="version.ruby1_9.major" value="${version.ruby1_9.major}"/>
+ <filter token="version.ruby1_9" value="${version.ruby1_9}"/>
+ <filter token="version.ruby1_9.patchlevel" value="${version.ruby1_9.patchlevel}"/>
+ <filter token="build.date" value="${build.date}"/>
+ <filter token="version.jruby" value="${version.jruby}"/>
<filter token="java.specification.version" value="${java.specification.version}"/>
<filter token="javac.version" value="${javac.version}"/>
- <filter token="build.date" value="${build.date}"/>
+ <filter token="os.arch" value="${os.arch}"/>
</filterset>
</copy>
</target>
@@ -297,6 +304,7 @@
<zipfileset src="${build.lib.dir}/jffi-i386-OpenBSD.jar"/>
<zipfileset src="${build.lib.dir}/jffi-x86_64-OpenBSD.jar"/>
<zipfileset src="${build.lib.dir}/jffi-i386-Windows.jar"/>
+ <zipfileset src="${build.lib.dir}/jffi-x86_64-Windows.jar"/>
<zipfileset src="${build.lib.dir}/jffi-s390x-Linux.jar"/>
<zipfileset src="${build.lib.dir}/joda-time-1.6.jar"/>
<zipfileset src="${build.lib.dir}/dynalang-0.3.jar"/>
@@ -443,6 +451,7 @@
<jarjar destfile="${dest.lib.dir}/${filename}">
<fileset dir="${jruby.classes.dir}"/>
<fileset dir="${build.dir}/jar-complete">
+ <exclude name="META-INF/jruby.home/lib/ruby/site_ruby/shared/builtin/**"/>
<exclude name="META-INF/jruby.home/lib/ruby/1.9/**"/>
</fileset>
<zipfileset src="${build.lib.dir}/asm-3.2.jar"/>
@@ -990,12 +999,12 @@
<sysproperty key="jruby.thread.pool.enabled" value="@{thread.pooling}"/>
<sysproperty key="jruby.reflection" value="@{reflection}"/>
<sysproperty key="jruby.launch.inproc" value="@{inproc}"/>
- <sysproperty key="emma.coverage.out.file" value="${test.results.dir}/coverage.emma" />
- <sysproperty key="emma.coverage.out.merge" value="true" />
+ <sysproperty key="emma.coverage.out.file" value="${test.results.dir}/coverage.emma" />
+ <sysproperty key="emma.coverage.out.merge" value="true" />
<sysproperty key="emma.verbosity.level" value="silent" />
<arg line="@{jruby.args}"/>
- <arg value="${base.dir}/bin/rake"/>
+ <arg line="-S rake"/>
<arg line="@{rake.targets}"/>
</java>
</sequential>
Binary file not shown.
View
Binary file not shown.
View
@@ -33,7 +33,11 @@ jruby.test.memory=512M
jruby.test.jvm=java
ruby.executable=/usr/bin/ruby
install4j.executable=/Applications/install4j\ 4/bin/install4jc
-version.jruby=1.5.0.dev
+version.ruby=1.8.7
version.ruby.major=1.8
version.ruby.minor=7
-
+version.ruby.patchlevel=174
+version.ruby1_9.major=1.9
+version.ruby1_9=1.9.2dev
+version.ruby1_9.patchlevel=24787
+version.jruby=1.5.0.dev
View
@@ -22,7 +22,7 @@ def self.find_type(name)
def self.map_types(spec)
if spec.kind_of?(String)
- spec.split //
+ spec.split(//)
elsif spec.kind_of?(Array)
spec
else
@@ -35,7 +35,6 @@
require 'builtin/javasupport/java'
require 'builtin/javasupport/proxy/array'
-require 'builtin/javasupport/proxy/interface'
require 'builtin/javasupport/utilities/base'
require 'builtin/javasupport/utilities/array'
require 'builtin/javasupport/core_ext'
@@ -1,27 +0,0 @@
-class JavaInterfaceExtender
- def initialize(java_class_name, &block)
- # don't really need @java_class here any more, keeping around
- # in case any users use this class directly
- @java_class = Java::JavaClass.for_name(java_class_name)
- @block = block
- end
-
- def extend_proxy(proxy_class)
- proxy_class.class_eval(&@block)
- end
-end
-
-class InterfaceJavaProxy < JavaProxy
- def self.impl(*meths, &block)
- block = lambda {|*args| send(:method_missing, *args) } unless block
-
- interface = JavaUtilities.get_interface_module java_class
- Class.new(self) do
- include interface
- define_method(:method_missing) do |name, *args|
- return block.call(name, *args) if meths.empty? || meths.include?(name)
- super
- end
- end.new
- end
-end
@@ -136,10 +136,12 @@ def callback(*args)
else
[ nil, args[0], args[1] ]
end
+
options = Hash.new
options[:convention] = defined?(@ffi_convention) ? @ffi_convention : :default
options[:enums] = @ffi_enums if defined?(@ffi_enums)
- cb = FFI::CallbackInfo.new(find_type(ret), params.map { |e| find_type(e) })
+
+ cb = FFI::CallbackInfo.new(find_type(ret), params.map { |e| find_type(e) }, options)
# Add to the symbol -> type map (unless there was no name)
unless name.nil?
@@ -6,6 +6,7 @@ class Foreign
SC_CLK_TCK = com.kenai.constantine.platform.Sysconf::_SC_CLK_TCK.value
extend FFI::Library
+ ffi_lib FFI::Library::LIBC
class Times < FFI::Struct
layout \
:utime => :long,
@@ -72,7 +72,7 @@
<dependency>
<groupId>org.jruby.ext.posix</groupId>
<artifactId>jnr-posix</artifactId>
- <version>1.0.5</version>
+ <version>1.0.8</version>
<scope>provided</scope>
</dependency>
<dependency>
View
@@ -72,7 +72,7 @@
<dependency>
<groupId>org.jruby.ext.posix</groupId>
<artifactId>jnr-posix</artifactId>
- <version>1.0.5</version>
+ <version>1.0.8</version>
<scope>provided</scope>
</dependency>
<dependency>
View
@@ -8,7 +8,7 @@
<version>1.5.0dev</version>
<name>JRuby Shared</name>
<url>http://www.jruby.org/</url>
- <description>A 1.8.5 compatible Ruby interpreter written in 100% pure Java</description>
+ <description>A 1.8.7 compatible Ruby interpreter written in 100% pure Java</description>
<issueManagement>
<system>JIRA</system>
View
@@ -1,6 +1,6 @@
# These are the pointers to the 'stable/frozen' versions of
# mspec and rubyspecs, used to for our CI runs.
-mspec.revision=bcec47c70e0678a29fd0c1345358c4daf7b971a3
+mspec.revision=1521f846a8e9c6da51697e962c39dc1f3c0fc473
-rubyspecs.revision=9b8d16adaa79a5b627f76b968d2e730b1ae3476f
+rubyspecs.revision=515547fc2e2024d3730fe6af925f37781e6cbd0e
@@ -424,11 +424,9 @@ def receiveByte(obj)
vri.result.should == obj
vri.result.class.should == Fixnum
- pending "char appears to be getting signed/unsigned-garbled" do
- vri_handler.receiveCharObj(obj).should == obj
- vri.result.should == obj
- vri.result.class.should == Fixnum
- end
+ vri_handler.receiveCharObj(obj).should == obj
+ vri.result.should == obj
+ vri.result.class.should == Fixnum
vri_handler.receiveIntObj(obj).should == obj
vri.result.should == obj
View
@@ -19,12 +19,6 @@ class MSpecScript
set :core, [
SPEC_DIR + '/core',
- # FIXME: Temporarily exclusion until JRUBY-4180 is fixed.
- '^' + SPEC_DIR + '/core/proc/case_compare_spec.rb',
- '^' + SPEC_DIR + '/core/proc/element_reference_spec.rb',
- '^' + SPEC_DIR + '/core/proc/yield_spec.rb',
- '^' + SPEC_DIR + '/core/proc/call_spec.rb',
-
# 1.9
'^' + SPEC_DIR + '/core/basicobject'
]
@@ -0,0 +1 @@
+fails(JRUBY-4180):Proc#call can receive block arguments
@@ -0,0 +1 @@
+fails(JRUBY-4180):Proc#[] can receive block arguments
Oops, something went wrong.

0 comments on commit 79ce626

Please sign in to comment.