Skip to content

Instantly share code, notes, and snippets.

Avatar

Brandon Fish bjfish

View GitHub Profile
View gist:5c6e32592ecb1715a5fd
1)
Array#+ tries to convert the passed argument to an Array using #to_ary ERROR
RubyTruffleError: internal implementation error - UnsupportedOperationException null org.jruby.truffle.nodes.core.ArrayNodes$AddNode.addEmptyIntegerFixnum(ArrayNodes.java:146)
/Users/brandonfish/Documents/jruby-mine/spec/ruby/core/array/plus_spec.rb:20:in `+': internal implementation error - UnsupportedOperationException null org.jruby.truffle.nodes.core.ArrayNodes$AddNode.addEmptyIntegerFixnum(ArrayNodes.java:146) (RubyTruffleError)
from /Users/brandonfish/Documents/jruby-mine/spec/ruby/core/array/plus_spec.rb:20:in `block in <main>'
from /Users/brandonfish/Documents/jruby-mine/spec/mspec/lib/mspec/runner/mspec.rb:69:in `instance_eval'
from /Users/brandonfish/Documents/jruby-mine/spec/mspec/lib/mspec/runner/mspec.rb:69:in `protect'
from /Users/brandonfish/Documents/jruby-mine/spec/mspec/lib/mspec/runner/context.rb:179:in `block in protect'
from core:/core/rubinius/common/enumerable.rb:354:in `block in all?'
View gist:4b7b5c8621083ee91216
Brandons-MacBook-Pro:jruby-mine brandonfish$ jt bench debug classic-fannkuch-redux
bash -c "JAVACMD=/Users/brandonfish/Downloads/graalvm-jdk1.8.0/bin /Users/brandonfish/Documents/jruby-mine/bin/jruby -J-Xmx2G -J-d64 -J-server -J-G:+TruffleCompilationExceptionsAreFatal -X+T -I/Users/brandonfish/Documents/bench9000/lib/bench/.. /Users/brandonfish/Documents/bench9000/lib/bench/benchmarks/classic/fannkuch-redux.rb"
/Users/brandonfish/Documents/jruby-mine/bin/jruby: line 393: /Users/brandonfish/Downloads/graalvm-jdk1.8.0/bin: is a directory
/Users/brandonfish/Documents/jruby-mine/bin/jruby: line 393: exec: /Users/brandonfish/Downloads/graalvm-jdk1.8.0/bin: cannot execute: Undefined error: 0
/Users/brandonfish/Documents/bench9000/lib/bench/implementation.rb:42:in `block in measure': undefined method `start_with?' for nil:NilClass (NoMethodError)
from /Users/brandonfish/Documents/bench9000/lib/bench/implementation.rb:37:in `popen'
from /Users/brandonfish/Documents/bench9000/lib/bench/implementation.rb:37:in `meas
View gist:d312f630b2b2547d01bb
enumerator = ArraySpecs.frozen_array.send(:collect!)
lambda { enumerator.each {|x| x } }.should raise_error(RuntimeError)
View pop.patch
diff --git a/truffle/src/main/java/org/jruby/truffle/nodes/core/ArrayNodes.java b/truffle/src/main/java/org/jruby/truffle/nodes/core/ArrayNodes.java
index d731818..1bb9e27 100644
--- a/truffle/src/main/java/org/jruby/truffle/nodes/core/ArrayNodes.java
+++ b/truffle/src/main/java/org/jruby/truffle/nodes/core/ArrayNodes.java
@@ -2427,7 +2427,7 @@ public abstract class ArrayNodes {
}
- @CoreMethod(names = "pop", raiseIfFrozenSelf = true)
+ @CoreMethod(names = "pop", needsSelf = true, raiseIfFrozenSelf = true, optional = 1)
View gist:eec727ab5dbfb5b0b42d
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project jruby-truffle: Compilation failure: Compilation failure:
[ERROR] /Users/brandonfish/Documents/jruby-mine/truffle/target/generated-sources/org/jruby/truffle/nodes/core/ArrayNodesFactory.java:[12397,68] cannot find symbol
[ERROR] symbol: variable frameValue
[ERROR] location: class org.jruby.truffle.nodes.core.ArrayNodesFactory.PopNodeFactory.PopUninitializedNode
[ERROR] /Users/brandonfish/Documents/jruby-mine/truffle/target/generated-sources/org/jruby/truffle/nodes/core/ArrayNodesFactory.java:[12472,85] cannot find symbol
[ERROR] symbol: variable frameValue
[ERROR] location: class org.jruby.truffle.nodes.core.ArrayNodesFactory.PopNodeFactory.PopObjectUndefinedPlaceholder0Node
[ERROR] /Users/brandonfish/Documents/jruby-mine/truffle/target/generated-sources/org/jruby/truffle/nodes/core/ArrayNodesFactory.java:[12559,85] cannot find symbol
[ERROR] symbol: variable frameValue
[ERROR] location:
View gist:454bee203e25491c8377
[truffle] opt fail go:rx.rb:1192 |Reason com.oracle.graal.nodes.util.GraphUtil$2: Frame escapes at: 83305|MethodCallTarget#HotSpotMethod<ArrayNodes$PackNode.pack(VirtualFrame, RubyArray, RubyString)>
properties:{invokeKind=Special, targetMethod=HotSpotMethod<ArrayNodes$PackNode.pack(VirtualFrame, RubyArray, RubyString)>, stamp=void, returnType=HotSpotType<Lorg/jruby/truffle/runtime/core/RubyString;, resolved>}
arguments: [83299|Const(ArrayNodesFactory.PackNodeFactory.PackRubyArrayRubyString2Node@367287701), 83256|NewFrame, 83348|Pi, 83361|Pi]
com.oracle.graal.nodes.util.GraphUtil$2: Frame escapes at: 83305|MethodCallTarget#HotSpotMethod<ArrayNodes$PackNode.pack(VirtualFrame, RubyArray, RubyString)>
properties:{invokeKind=Special, targetMethod=HotSpotMethod<ArrayNodes$PackNode.pack(VirtualFrame, RubyArray, RubyString)>, stamp=void, returnType=HotSpotType<Lorg/jruby/truffle/runtime/core/RubyString;, resolved>}
arguments: [83299|Const(ArrayNodesFactory.PackN
View gist:eba190b4745d93c77db0
# Running tests:
[1590/6445] TestCoverage#test_result_with_nothing/Users/brandonfish/Documents/jruby/test/mri/coverage/test_coverage.rb:10: warning: tracing (e.g. set_trace_func) will not capture all events without --debug flag
[2150/6445] TestException#test_thread_signal_locationjruby: unknown option --disable-gems -d
[2941/6445] TestIO#test_close_readErrno::EPIPE: Broken pipe - <STDOUT>
write at org/jruby/RubyIO.java:1440
write at org/jruby/RubyIO.java:1411
<top> at -e:1
[3515/6445] TestIterator#test_return_trace_func/Users/brandonfish/Documents/jruby/test/mri/ruby/test_iterator.rb:450: warning: tracing (e.g. set_trace_func) will not capture all events without --debug flag
[3771/6445] TestM17NComb#test_str_include? = 1.31 s
View gist:ce29048912e55a6f5e86
$ ruby -e 'puts require "complex"'
true
$ bin/jruby -X+T -e 'puts require "complex"'
-e:1:in `require': cannot load such file -- complex (LoadError)
from -e:1:in `<main>'
$ bin/jruby -e 'puts require "complex"'
false
$ rvm rbx do ruby -e 'puts require "complex"'
true
View gist:4415c86560c468b82b48
1)
Encoding.default_external with command line options is not changed by the -U option FAILED
Expected "UTF-8"
to equal "US-ASCII"
/Users/brandonfish/Documents/jruby/spec/mspec/lib/mspec/expectations/expectations.rb:15:in `initialize': Expected "UTF-8"
to equal "US-ASCII"
(SpecExpectationNotMetError)
from /Users/brandonfish/Documents/jruby/spec/mspec/lib/mspec/expectations/expectations.rb:15:in `raise'
from /Users/brandonfish/Documents/jruby/spec/mspec/lib/mspec/expectations/expectations.rb:15:in `fail_with'
@bjfish
bjfish / result.patch
Created Apr 13, 2015
Workarounds + Fixes to Run MRI test - `./bin/jruby -X+T test/mri/runner.rb -v --color=never --tty=no -q -- test_set.rb`
View result.patch
diff --git a/lib/ruby/stdlib/optparse.rb b/lib/ruby/stdlib/optparse.rb
index 4ec891e..3348145 100644
--- a/lib/ruby/stdlib/optparse.rb
+++ b/lib/ruby/stdlib/optparse.rb
@@ -264,9 +264,17 @@ class OptionParser
end
def self.candidate(key, icase = false, pat = nil, &block)
+ puts "key #{key}"
+ return [[:never, [:never], "never"]] if key == "never"
You can’t perform that action at this time.