View fib.java
1 2 3 4 5 6 7 8 9 10
@JRubyMethod(name = "fib_ruby", frame = true, required = 1, optional = 0, rest = false)
public static IRubyObject method__0$RUBY$fib_ruby(
final bench_fib_recursive bench_fib_recursive,
final ThreadContext threadContext,
final IRubyObject rubyObject,
final IRubyObject rubyObject2,
final Block block) {
if (bench_fib_recursive.getCallSite1().call(threadContext, rubyObject, rubyObject2, 2L).isTrue()) {
return rubyObject2
View gist:2b65c9bbdc142d811cfe
1 2 3 4 5 6 7 8 9 10
static VALUE
rb_ary_hash(VALUE ary)
{
long i;
st_index_t h;
VALUE n;
 
h = rb_hash_start(RARRAY_LEN(ary));
h = rb_hash_uint(h, (st_index_t)rb_ary_hash);
for (i=0; i<RARRAY_LEN(ary); i++) {
View gist:5d52df923eb615729ca3
1 2 3 4 5 6 7 8 9 10
- does not treat hashes with string keys as keyword arguments/Users/headius/projects/rubyspec/language/block_spec.rb:6: [BUG] Segmentation fault at 0x00000000000000
ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin14]
 
-- Crash Report log information --------------------------------------------
See Crash Report log file under the one of following:
* ~/Library/Logs/CrashReporter
* /Library/Logs/CrashReporter
* ~/Library/Logs/DiagnosticReports
* /Library/Logs/DiagnosticReports
for more details.
View gist:4226cd94bbcf7b150e65
1 2 3 4 5 6 7 8 9 10
diff -ur ../jruby-ruby/test/lib/minitest/unit.rb test/mri/lib/minitest/unit.rb
--- ../jruby-ruby/test/lib/minitest/unit.rb 2014-12-10 14:07:59.000000000 -0600
+++ test/mri/lib/minitest/unit.rb 2015-01-02 11:56:59.000000000 -0600
@@ -2,7 +2,7 @@
require "optparse"
require "rbconfig"
-require "leakchecker"
+# require "leakchecker"
View test_redirected_io_to_custom_class.rb
1 2 3 4 5 6 7 8 9 10
require 'logger'
 
class StandardOutput < IO
def initialize(logger)
@logger = logger
end
 
def write(message)
@logger.info("INTERCEPTED: #{message}")
end
View test_non_ascii_filename_mkpath.rb
1 2 3 4 5 6 7 8 9 10
#encoding: UTF-8
 
require 'pathname'
 
path = '/tmp/INSERT_NON_ASCII_NAME' # just type in any non-ascii characters
pathname = Pathname.new(path)
 
begin
puts 'MKPATH'
# fails with IllegalArgumentException
View halfsync_halfasync.rb
1 2 3 4 5 6 7 8 9
require "singleton"
require "socket"
 
ACCEPT_EVENT = 0x01
RECEIVE_EVENT = 0x02
WRITE_EVENT = 0x04
# Y_EVENT = 0x08
# Z_EVENT = 0x10
# Etc.
View super_bench.rb
1 2 3 4 5 6 7 8 9 10
# Test the performance of testing for equality in a class that includes
# a module and calls super on it. See if there is any difference between
# arg == Const and Const == arg for the runtimes.
#
 
require 'rubygems'
require 'benchmark'
 
A = 1
B = 2
View gist:e87a4723d643cfd38769
1 2 3 4 5 6 7 8 9 10
diff --git a/core/src/main/java/org/jruby/RubyThread.java b/core/src/main/java/org/jruby/RubyThread.java
index cf325de..cbc0c82 100644
--- a/core/src/main/java/org/jruby/RubyThread.java
+++ b/core/src/main/java/org/jruby/RubyThread.java
@@ -55,6 +55,7 @@ import org.jruby.internal.runtime.NativeThread;
import org.jruby.internal.runtime.RubyRunnable;
import org.jruby.internal.runtime.ThreadLike;
import org.jruby.internal.runtime.ThreadService;
+import org.jruby.javasupport.JavaUtil;
import org.jruby.runtime.Block;
View gist:84731230ede769fdce5d
1 2 3 4 5 6 7 8 9 10
diff -ru ../ruby/test/lib/leakchecker.rb test/mri/lib/leakchecker.rb
--- ../ruby/test/lib/leakchecker.rb 2014-11-04 23:26:38.000000000 -0600
+++ test/mri/lib/leakchecker.rb 2014-11-08 11:46:12.000000000 -0600
@@ -66,7 +66,6 @@
end
puts "Leaked file descriptor: #{test_name}: #{fd}#{str}"
}
- #system("lsof -p #$$") if !fd_leaked.empty?
h.each {|fd, list|
next if list.length <= 1
Something went wrong with that request. Please try again.