sproutcore / abbot

SproutCore Build Tools [deprecated]
http://www.sproutcore.com
88 stars 44 forks source link

[1.7.1.beta] Using Ruby 1.9-only features causes issues with Ruby 1.8.7 #69

Closed rykov closed 13 years ago

rykov commented 13 years ago

The README suggests using Ruby 1.8.6+, but the 1.7.1.beta seems to throw the following error in Ruby 1.8.7 on OSX

/Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `gem_original_require': /Library/Ruby/Gems/1.8/gems/sproutcore-1.7.1.beta/lib/sproutcore/rack/service.rb:62: syntax error, unexpected tIDENTIFIER, expecting tAMPER (SyntaxError)
        app = self.new(*projects, opts)

/Library/Ruby/Gems/1.8/gems/sproutcore-1.7.1.beta/lib/sproutcore/rack/service.rb:96: syntax error, unexpected tIDENTIFIER, expecting tAMPER or '&'
      def initialize(*projects, opts)

Everything works fine in Ruby 1.9.2

wagenet commented 13 years ago

The issue here is that prior to 1.9 you can only have a *param as the last parameter of the object. I should be able to make a quick fix for this.

rykov commented 13 years ago

Would the calling line still cause problems? This one here:

- app = self.new(*projects, opts)
+ app = self.new(*(projects + [opts]))
wagenet commented 13 years ago

Good catch. Thanks.