Skip to content

Commit

Permalink
Merge branch 'master' into truffle-head
Browse files Browse the repository at this point in the history
Conflicts:
	truffle/src/main/java/org/jruby/truffle/nodes/core/HashNodes.java
	truffle/src/main/java/org/jruby/truffle/nodes/core/StringNodes.java
	truffle/src/main/java/org/jruby/truffle/runtime/hash/HashOperations.java
  • Loading branch information
chrisseaton committed Mar 8, 2015
2 parents 3df96dd + bd25c3c commit 1f158bf
Show file tree
Hide file tree
Showing 88 changed files with 1,037 additions and 350 deletions.
8 changes: 8 additions & 0 deletions core/src/main/java/org/jruby/util/JarCache.java
Expand Up @@ -25,6 +25,14 @@
* The implementation pays attention to lastModified timestamp of the jar and will invalidate
* the cache entry if jar has been updated since the snapshot calculation.
* </p>
*
* ******************************************************************************************
* DANGER DANGER DANGER DANGER DANGER DANGER DANGER DANGER DANGER DANGER DANGER DANGER DANGER
* ******************************************************************************************
*
* The spec for this cache is disabled currently for #2655, because of last-modified time
* oddities on CloudBees. Please be cautious modifying this code and make sure you run the
* associated spec locally.
*/
class JarCache {
static class JarIndex {
Expand Down
25 changes: 19 additions & 6 deletions spec/java_integration/utilities/jar_glob_spec.rb
Expand Up @@ -94,18 +94,31 @@ def jar_entries(full_entries)
end
end

=begin For some reason, mtime does not update on Jenkins on Cloudbees
it "respects jar content filesystem changes" do
jar_path = File.join(Dir.pwd, 'glob_test', 'modified-glob-test.jar')
FileUtils.cp 'glob-test.jar', jar_path
lambda do
# Need to sleep a little bit to make sure that modified time is updated
sleep 2
before = Dir.glob("#{jar_path}!/**/*").size
# This should delete the /glob_target and /glob_target/bar.txt entries
`zip -d #{jar_path} glob_target/bar.txt`
end.should change { Dir.glob("#{jar_path}!/**/*").size }.by -2
puts File.mtime(jar_path)
# Need to sleep a little bit to make sure that modified time is updated
sleep 2
# This should delete the /glob_target and /glob_target/bar.txt entries
`zip -d #{jar_path} glob_target/bar.txt`
puts File.mtime(jar_path)
# Explicitly touch the file in case mtime and zip don't agree
`touch #{jar_path}`
after = Dir.glob("#{jar_path}!/**/*").size
expect(after - before).to eq(-2)
end
=end
end

describe 'Dir globs (Dir.glob and Dir.[]) +' do
Expand Down
6 changes: 0 additions & 6 deletions spec/ruby/shared/mutex/lock.rb
Expand Up @@ -36,15 +36,9 @@
th = Thread.new do
m.lock
m.lock
v = 1
end

Thread.pass while th.status and th.status != "sleep"

ScratchPad.recorded.should be_nil

lambda do
th.kill
th.join
end.should raise_error(ThreadError)
end
Expand Down
1 change: 0 additions & 1 deletion spec/truffle/tags/core/array/element_set_tags.txt
Expand Up @@ -7,7 +7,6 @@ fails:Array#[]= replaces the section defined by range with the given values
fails:Array#[]= just sets the section defined by range to other even if other is nil
fails:Array#[]= expands and nil-pads the array if section assigned by range is outside array boundaries
fails:Array#[]= calls to_int on its start and length arguments
fails:Array#[]= checks frozen before attempting to coerce arguments
fails:Array#[]= sets elements in the range arguments when passed ranges
fails:Array#[]= inserts the given elements with [range] which the range is zero-width
fails:Array#[]= inserts the given elements with [start, length] which length is zero
Expand Down
9 changes: 0 additions & 9 deletions spec/truffle/tags/core/array/fetch_tags.txt

This file was deleted.

2 changes: 0 additions & 2 deletions spec/truffle/tags/core/array/flatten_tags.txt
@@ -1,3 +1 @@
fails:Array#flatten returns subclass instance for Array subclasses
fails:Array#flatten returns a tainted array if self is tainted
fails:Array#flatten returns an untrusted array if self is untrusted
2 changes: 0 additions & 2 deletions spec/truffle/tags/core/enumerable/entries_tags.txt
@@ -1,3 +1 @@
fails:Enumerable#entries passes through the values yielded by #each_with_index
fails:Enumerable#entries returns a tainted array if self is tainted
fails:Enumerable#entries returns an untrusted array if self is untrusted
2 changes: 0 additions & 2 deletions spec/truffle/tags/core/enumerable/group_by_tags.txt

This file was deleted.

2 changes: 0 additions & 2 deletions spec/truffle/tags/core/enumerable/to_a_tags.txt
@@ -1,3 +1 @@
fails:Enumerable#to_a returns a tainted array if self is tainted
fails:Enumerable#to_a returns an untrusted array if self is untrusted
fails:Enumerable#to_a passes through the values yielded by #each_with_index
5 changes: 0 additions & 5 deletions spec/truffle/tags/core/enumerable/zip_tags.txt

This file was deleted.

8 changes: 0 additions & 8 deletions spec/truffle/tags/core/hash/assoc_tags.txt

This file was deleted.

1 change: 0 additions & 1 deletion spec/truffle/tags/core/hash/clear_tags.txt

This file was deleted.

15 changes: 0 additions & 15 deletions spec/truffle/tags/core/hash/compare_by_identity_tags.txt

This file was deleted.

7 changes: 0 additions & 7 deletions spec/truffle/tags/core/hash/delete_if_tags.txt

This file was deleted.

2 changes: 0 additions & 2 deletions spec/truffle/tags/core/hash/delete_tags.txt
@@ -1,3 +1 @@
fails:Hash#delete calls supplied block if the key is not found
fails:Hash#delete accepts keys with private #hash method
fails:Hash#delete raises a RuntimeError if called on a frozen instance
1 change: 0 additions & 1 deletion spec/truffle/tags/core/hash/element_reference_tags.txt
@@ -1,3 +1,2 @@
fails:Hash#[] calls subclass implementations of default
fails:Hash#[] finds a value via an identical key even when its #eql? isn't reflexive
fails:Hash#[] supports keys with private #hash method
2 changes: 0 additions & 2 deletions spec/truffle/tags/core/hash/element_set_tags.txt
@@ -1,3 +1 @@
fails:Hash#[]= accepts keys with private #hash method
fails:Hash#[]= doesn't duplicate and freeze already frozen string keys
fails:Hash#[]= raises a RuntimeError if called on a frozen instance
1 change: 0 additions & 1 deletion spec/truffle/tags/core/hash/fetch_tags.txt

This file was deleted.

9 changes: 0 additions & 9 deletions spec/truffle/tags/core/hash/flatten_tags.txt

This file was deleted.

1 change: 0 additions & 1 deletion spec/truffle/tags/core/hash/has_key_tags.txt

This file was deleted.

1 change: 0 additions & 1 deletion spec/truffle/tags/core/hash/include_tags.txt

This file was deleted.

4 changes: 0 additions & 4 deletions spec/truffle/tags/core/hash/index_tags.txt

This file was deleted.

1 change: 0 additions & 1 deletion spec/truffle/tags/core/hash/initialize_copy_tags.txt
@@ -1,4 +1,3 @@
fails:Hash#initialize_copy replaces the contents of self with other
fails:Hash#initialize_copy tries to convert the passed argument to a hash using #to_hash
fails:Hash#initialize_copy raises a RuntimeError if called on a frozen instance that is modified
fails:Hash#initialize_copy raises a RuntimeError if called on a frozen instance that would not be modified
7 changes: 0 additions & 7 deletions spec/truffle/tags/core/hash/keep_if_tags.txt

This file was deleted.

5 changes: 0 additions & 5 deletions spec/truffle/tags/core/hash/key_tags.txt

This file was deleted.

1 change: 0 additions & 1 deletion spec/truffle/tags/core/hash/member_tags.txt

This file was deleted.

1 change: 0 additions & 1 deletion spec/truffle/tags/core/hash/new_tags.txt

This file was deleted.

8 changes: 0 additions & 8 deletions spec/truffle/tags/core/hash/rassoc_tags.txt

This file was deleted.

2 changes: 0 additions & 2 deletions spec/truffle/tags/core/hash/rehash_tags.txt

This file was deleted.

14 changes: 0 additions & 14 deletions spec/truffle/tags/core/hash/reject_tags.txt

This file was deleted.

9 changes: 0 additions & 9 deletions spec/truffle/tags/core/hash/select_tags.txt

This file was deleted.

4 changes: 0 additions & 4 deletions spec/truffle/tags/core/hash/shift_tags.txt

This file was deleted.

1 change: 0 additions & 1 deletion spec/truffle/tags/core/hash/sort_tags.txt

This file was deleted.

2 changes: 0 additions & 2 deletions spec/truffle/tags/core/hash/store_tags.txt
@@ -1,3 +1 @@
fails:Hash#store accepts keys with private #hash method
fails:Hash#store doesn't duplicate and freeze already frozen string keys
fails:Hash#store raises a RuntimeError if called on a frozen instance
8 changes: 0 additions & 8 deletions spec/truffle/tags/core/hash/try_convert_tags.txt

This file was deleted.

1 change: 0 additions & 1 deletion spec/truffle/tags/core/hash/values_at_tags.txt

This file was deleted.

3 changes: 0 additions & 3 deletions spec/truffle/tags/core/module/included_tags.txt

This file was deleted.

2 changes: 0 additions & 2 deletions spec/truffle/tags/core/string/byteslice_tags.txt

This file was deleted.

1 change: 0 additions & 1 deletion spec/truffle/tags/core/string/capitalize_tags.txt
@@ -1,2 +1 @@
fails:String#capitalize is locale insensitive (only upcases a-z and only downcases A-Z)
fails:String#capitalize returns subclass instances when called on a subclass
4 changes: 0 additions & 4 deletions spec/truffle/tags/core/string/codepoints_tags.txt
@@ -1,11 +1,7 @@
fails:String#codepoints raises an ArgumentError when self has an invalid encoding and a method is called on the returned Enumerator
fails:String#codepoints yields each codepoint to the block if one is given
fails:String#codepoints raises an ArgumentError if self's encoding is invalid and a block is given
fails:String#codepoints returns codepoints as Fixnums
fails:String#codepoints returns one codepoint for each character
fails:String#codepoints works for multibyte characters
fails:String#codepoints returns the codepoint corresponding to the character's position in the String's encoding
fails:String#codepoints round-trips to the original String using Integer#chr
fails:String#codepoints is synonomous with #bytes for Strings which are single-byte optimisable
fails:String#codepoints returns an Array when no block is given
fails:String#codepoints raises an ArgumentError when no block is given if self has an invalid encoding
1 change: 0 additions & 1 deletion spec/truffle/tags/core/string/downcase_tags.txt
@@ -1,2 +1 @@
fails:String#downcase is locale insensitive (only replaces A-Z)
fails:String#downcase returns a subclass instance for subclasses
1 change: 0 additions & 1 deletion spec/truffle/tags/core/string/dump_tags.txt
@@ -1,2 +1 @@
fails:String#dump returns a subclass instance
fails:String#dump includes .force_encoding(name) if the encoding isn't ASCII compatible
5 changes: 0 additions & 5 deletions spec/truffle/tags/core/string/each_codepoint_tags.txt
@@ -1,11 +1,6 @@
fails:String#each_codepoint raises an ArgumentError when self has an invalid encoding and a method is called on the returned Enumerator
fails:String#each_codepoint yields each codepoint to the block if one is given
fails:String#each_codepoint raises an ArgumentError if self's encoding is invalid and a block is given
fails:String#each_codepoint returns codepoints as Fixnums
fails:String#each_codepoint returns one codepoint for each character
fails:String#each_codepoint works for multibyte characters
fails:String#each_codepoint returns the codepoint corresponding to the character's position in the String's encoding
fails:String#each_codepoint round-trips to the original String using Integer#chr
fails:String#each_codepoint is synonomous with #bytes for Strings which are single-byte optimisable
fails:String#each_codepoint returns an Enumerator when no block is given
fails:String#each_codepoint returns an Enumerator when no block is given even when self has an invalid encoding
1 change: 0 additions & 1 deletion spec/truffle/tags/core/string/each_line_tags.txt

This file was deleted.

2 changes: 0 additions & 2 deletions spec/truffle/tags/core/string/element_reference_tags.txt
@@ -1,5 +1,3 @@
fails:String#[] with index, length returns subclass instances
fails:String#[] with Range returns subclass instances
fails:String#[] with Range calls to_int on range arguments
fails:String#[] with Range works with Range subclasses
fails:String#[] with Regexp returns subclass instances
Expand Down
1 change: 0 additions & 1 deletion spec/truffle/tags/core/string/gsub_tags.txt
Expand Up @@ -9,4 +9,3 @@ fails:String#gsub! with pattern and block uses the compatible encoding if they a
fails:String#gsub! with pattern and block replaces the incompatible part properly even if the encodings are not compatible
fails:String#gsub with pattern and replacement respects $KCODE when the pattern collapses
fails:String#gsub with pattern and replacement handles pattern collapse without $KCODE
fails:String#gsub with pattern and replacement returns subclass instances when called on a subclass
1 change: 0 additions & 1 deletion spec/truffle/tags/core/string/lines_tags.txt

This file was deleted.

3 changes: 0 additions & 3 deletions spec/truffle/tags/core/string/slice_tags.txt
@@ -1,5 +1,3 @@
fails:String#slice with index, length returns subclass instances
fails:String#slice with Range returns subclass instances
fails:String#slice with Range calls to_int on range arguments
fails:String#slice with Range works with Range subclasses
fails:String#slice with Regexp returns subclass instances
Expand All @@ -14,7 +12,6 @@ fails:String#slice! with index, length always taints resulting strings when self
fails:String#slice! with index, length calls to_int on idx and length
fails:String#slice! with index, length returns subclass instances
fails:String#slice! with index, length returns the substring given by the character offsets
fails:String#slice! Range returns subclass instances
fails:String#slice! Range calls to_int on range arguments
fails:String#slice! Range works with Range subclasses
fails:String#slice! Range returns the substring given by the character offsets of the range
Expand Down
1 change: 0 additions & 1 deletion spec/truffle/tags/core/string/sub_tags.txt
@@ -1,5 +1,4 @@
fails:String#sub with pattern, replacement treats \+ as an empty string if there was no captures
fails:String#sub with pattern, replacement returns subclass instances when called on a subclass
fails:String#sub with pattern and block sets $~ for access from the block
fails:String#sub! with pattern and block sets $~ for access from the block
fails:String#sub! with pattern and block raises a RuntimeError if the string is modified while substituting
Expand Down
1 change: 0 additions & 1 deletion spec/truffle/tags/core/string/succ_tags.txt

This file was deleted.

1 change: 0 additions & 1 deletion spec/truffle/tags/core/string/swapcase_tags.txt
@@ -1,3 +1,2 @@
fails:String#swapcase is locale insensitive (only upcases a-z and only downcases A-Z)
fails:String#swapcase returns subclass instances when called on a subclass
fails:String#swapcase! returns nil if no modifications were made

0 comments on commit 1f158bf

Please sign in to comment.