gemspec example on

Azul's Avatar


14 Aug, 2010 08:09 AM


I just ran into problems with a gemspec that is very similar to what can be found here:

spec.files = Dir['lib/**/*.rb'] + Dir['bin/*']
spec.files << Dir['[A-Z]*'] + Dir['test/**/*']

The code I was working with was:

s.files = %w[LICENSE README.textile Rakefile SYNTAX_REFERENCE greencloth.gemspec]`
s.files << Dir['lib/*.rb'] + Dir['test/*.rb']`

The last line would add an array as the last item of the array which would then be removed. I was able to work around this by using
+= instead of <<. I am not sure this is an issue just for me but it feels like the documentation is suggesting sth. that does not work here.

I am using rubygems 1.3.6

  1. Support Staff 1 Posted by Nick Quaranto on 14 Aug, 2010 04:21 PM

    Nick Quaranto's Avatar

    Yeah, that's a pretty crappy example...a lot of the RG docs need to be revisited. Thanks for pointing this out.

  2. 2 Posted by Josh Nichols on 14 Aug, 2010 06:53 PM

    Josh Nichols's Avatar

    Azul, I've updated the example to use += instead of <<. Thanks!

  3. Josh Nichols closed this discussion on 14 Aug, 2010 06:53 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac