JRuby support
This commit is contained in:
parent
a977cdd2ce
commit
2bd6ebea11
|
@ -1,10 +1,17 @@
|
||||||
|
language: ruby
|
||||||
rvm:
|
rvm:
|
||||||
- 1.9.2
|
- 1.9.2
|
||||||
- 1.9.3
|
- 1.9.3
|
||||||
- 2.0.0
|
- 2.0.0
|
||||||
- ruby-head
|
- ruby-head
|
||||||
- rbx-19mode
|
- rbx-19mode
|
||||||
|
- jruby-19mode
|
||||||
|
before_install:
|
||||||
|
- gem update --system
|
||||||
|
- gem --version
|
||||||
before_script: "sudo apt-get -y install zip unzip"
|
before_script: "sudo apt-get -y install zip unzip"
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
|
allow_failures:
|
||||||
|
- rvm: ruby-head
|
||||||
|
|
|
@ -58,7 +58,7 @@ module Zip
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_local_bin
|
def to_local_bin
|
||||||
self.map { |_, v| v.to_local_bin }.join
|
self.map { |_, v| v.to_local_bin.force_encoding('BINARY') }.join
|
||||||
end
|
end
|
||||||
|
|
||||||
alias :to_s :to_local_bin
|
alias :to_s :to_local_bin
|
||||||
|
|
|
@ -873,13 +873,12 @@ class ZipEntrySetTest < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_each
|
def test_each
|
||||||
# Tested indirectly via each_with_index
|
# Used each instead each_with_index due the bug in jRuby
|
||||||
count = 0
|
count = 0
|
||||||
@zipEntrySet.each_with_index {
|
@zipEntrySet.each do |entry|
|
||||||
|entry, index|
|
|
||||||
assert(ZIP_ENTRIES.include?(entry))
|
assert(ZIP_ENTRIES.include?(entry))
|
||||||
count = count.succ
|
count += 1
|
||||||
}
|
end
|
||||||
assert_equal(ZIP_ENTRIES.size, count)
|
assert_equal(ZIP_ENTRIES.size, count)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue