cowboyd / commonjs.rb

Common JS for Ruby
github.com/cowboyd/commonjs.rb
MIT License
61 stars 26 forks source link

Ruby 1.8 Compatibility #2

Closed henriquesobral closed 12 years ago

henriquesobral commented 12 years ago

I got the following error on rails server using Ruby 1.8.7.

/Library/Ruby/Gems/1.8/gems/commonjs-0.2.4/lib/commonjs/module.rb:16: syntax error, unexpected '=', expecting '|' (SyntaxError) @require_function ||= lambda do |this, module_id = nil|

commonjs, will lost ruby 1.8 compatibility?

Thanks!!

cowboyd commented 12 years ago

No, we'll figure out a patch. In the mean time, I would lock to a good version.

DouweM commented 12 years ago

Oh damn, I didn't realize that was Ruby 1.9 syntax. Let's see if I can fix it from my iPad...

DouweM commented 12 years ago

See #3!

henriquesobral commented 12 years ago

Thanks!!!

arsfeld commented 12 years ago

Thanks, just had this issue and your patch fixed it.

DouweM commented 12 years ago

@cowboyd Could you merge #3 into core?