This file contains 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/ruby/stdlib/optparse.rb b/lib/ruby/stdlib/optparse.rb | |
index 4ec891e..5a27f8e 100644 | |
--- a/lib/ruby/stdlib/optparse.rb | |
+++ b/lib/ruby/stdlib/optparse.rb | |
@@ -264,6 +264,8 @@ class OptionParser | |
end | |
def self.candidate(key, icase = false, pat = nil, &block) | |
+ return [[:never, [:never], "never"]] if key == "never" | |
+ return [[:no, [:no], "no"]] if key == "no" |
This file contains 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
echo 'jt test mri ruby/test_alias.rb' && jt test mri ruby/test_alias.rb || echo 'jt test mri ruby/test_array.rb' && jt test mri ruby/test_array.rb || echo 'jt test mri ruby/test_assignment.rb' && jt test mri ruby/test_assignment.rb || echo 'jt test mri ruby/test_autoload.rb' && jt test mri ruby/test_autoload.rb || echo 'jt test mri ruby/test_basicinstructions.rb' && jt test mri ruby/test_basicinstructions.rb || echo 'jt test mri ruby/test_beginendblock.rb' && jt test mri ruby/test_beginendblock.rb || echo 'jt test mri ruby/test_bignum.rb' && jt test mri ruby/test_bignum.rb || echo 'jt test mri ruby/test_call.rb' && jt test mri ruby/test_call.rb || echo 'jt test mri ruby/test_case.rb' && jt test mri ruby/test_case.rb || echo 'jt test mri ruby/test_class.rb' && jt test mri ruby/test_class.rb || echo 'jt test mri ruby/test_clone.rb' && jt test mri ruby/test_clone.rb || echo 'jt test mri ruby/test_comparable.rb' && jt test mri ruby/test_comparable.rb || echo 'jt test mri ruby/test_complex.rb' && jt test mri ruby/ |
This file contains 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/ruby/stdlib/tmpdir.rb b/lib/ruby/stdlib/tmpdir.rb | |
index 9ba06d5..5b4b143 100644 | |
--- a/lib/ruby/stdlib/tmpdir.rb | |
+++ b/lib/ruby/stdlib/tmpdir.rb | |
@@ -30,11 +30,11 @@ class Dir | |
for dir in [ENV['TMPDIR'], ENV['TMP'], ENV['TEMP'], @@systmpdir, '/tmp', '.'] | |
next if !dir | |
dir = File.expand_path(dir) | |
- if stat = File.stat(dir) and stat.directory? and stat.writable? and | |
- (!(@@using_19 && stat.world_writable?) || stat.sticky?) |
This file contains 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
@Specialization | |
public Object stringByteSubstring(RubyString string, long index, int length) { | |
return stringByteSubstring(string, (int) index, length); | |
} | |
@Specialization | |
public Object stringByteSubstring(RubyString string, int index, long length) { | |
return stringByteSubstring(string, index, (int) length); | |
} |
This file contains 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
# Add a small Rakefile to current directory | |
task :default => [:test] | |
task :test do | |
puts "Hello Rake" | |
end | |
# Rake's file_utils.rb needs the following small workaround/change: | |
RUBY = '/Users/brandonfish/Documents/jruby-mine/bin/jruby' | |
# ENV['RUBY'] || File.join( |
This file contains 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
file = File.open("../../../jruby-patches/test_output_more.txt", "rb") | |
contents = file.read | |
# sep = "TEST_SEPARATOR" | |
# results = contents.split(sep) | |
load_error_output = "0 tests, 0 assertions, 0 failures, 0 errors, 0 skips" | |
This file contains 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
Infinity = Float::INFINITY | |
NaN = Float::NAN | |
def assert_equal(one, two) | |
raise "Expected: `#{one.b}` Actual: `#{two}`" if one.b != two | |
end | |
assert_equal("z",([] << 122).pack('C*')) | |
assert_equal("\x12",([] << 18).pack('C*')) | |
assert_equal("\x04",([] << 4).pack('C*')) | |
assert_equal("\x06",([] << 6).pack('C*')) | |
assert_equal("\b",([] << 8).pack('C*')) |
This file contains 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
@CoreMethod(names = "home_directory", onSingleton = true) | |
public abstract static class HomeDirectoryNode extends CoreMethodNode { | |
public HomeDirectoryNode(RubyContext context, SourceSection sourceSection) { | |
super(context, sourceSection); | |
} | |
public HomeDirectoryNode(HomeDirectoryNode prev) { | |
super(prev); | |
} |
This file contains 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
./bin/jruby -X+T -S gem -v | |
2.4.6 | |
./bin/jruby -X+T -S gem -h | |
RubyGems is a sophisticated package manager for Ruby. This is a | |
basic help message containing pointers to more information. | |
Usage: | |
gem -h/--help | |
gem -v/--version |
This file contains 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
1) Failure: | |
TC_Set#test_eq [ from /Users/brandonfish/Documents/jruby/test/mri/test_set.rb:522]: | |
<#<Set: {"a", "b", #<: {"a", "b", #<: {"a", "b"}>}>}>> expected but was | |
<#<Set: {"a", "b", #<: {"a", "b", #<: {"a", "b"}>}>}>>. |