jruby/warbler — Issue #76: warble aborted: 'can't modify frozen string'
Author: utensil
Created: 2012-02-18 01:26:40+00:00
State: open

```
OS: Mint 12 32bit, a variant from Ubuntu
ruby: 1.9.2p290 (2011-07-09 revision 32553) [i686-linux]
gem: 1.3.7
```

With a minimal directory structure:
```
bin/test.rb
lib/
```
where test.rb is simple a one-liner:

```rb
require 'open-uri'

open('https://api.github.com/users/jruby') do |f|
puts f.read
end
```
Run

```
warble jar
```
And we have:

```
rm -f test_warble.jar
Creating test_warble.jar
warble aborted!
can't modify frozen string

Tasks: TOP => jar:jar
(See full trace by running task with --trace)
```

Full trace:

```
** Invoke jar (first_time)
** Execute jar
** Invoke jar:files (first_time)
** Execute jar:files
** Invoke jar:jar (first_time)
** Execute jar:jar
rm -f test_warble.jar
Creating test_warble.jar
warble aborted!
can't modify frozen string
/var/lib/gems/1.9.1/gems/rubyzip-0.9.6.1/lib/zip/zip_file.rb:263:in `mkdir'
/var/lib/gems/1.9.1/gems/warbler-1.3.2/lib/warbler/jar.rb:227:in `block (2 levels) in create_jar'
/var/lib/gems/1.9.1/gems/warbler-1.3.2/lib/warbler/jar.rb:220:in `each'
/var/lib/gems/1.9.1/gems/warbler-1.3.2/lib/warbler/jar.rb:220:in `block in create_jar'
/var/lib/gems/1.9.1/gems/rubyzip-0.9.6.1/lib/zip/zip_file.rb:86:in `open'
/var/lib/gems/1.9.1/gems/warbler-1.3.2/lib/warbler/jar.rb:219:in `create_jar'
/var/lib/gems/1.9.1/gems/warbler-1.3.2/lib/warbler/jar.rb:83:in `create'
/var/lib/gems/1.9.1/gems/warbler-1.3.2/lib/warbler/task.rb:124:in `block in define_jar_task'
/var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
```
And /var/lib/gems/1.9.1/gems/rubyzip-0.9.6.1/lib/zip/zip_file.rb:263 is

```rb
# Creates a directory
def mkdir(entryName, permissionInt = 0755)
if find_entry(entryName)
raise Errno::EEXIST, "File exists - #{entryName}"
end
entryName = entryName.to_s
:263 entryName << '/' unless entryName.end_with?('/')
@entrySet << ZipStreamableDirectory.new(@name, entryName, nil, permissionInt)
end
```