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