mloughran / em-hiredis

Eventmachine redis client
MIT License
221 stars 63 forks source link

em-hiredis-0.3.0 doesn't even load, MacOSX stock Ruby #34

Open michiexile opened 9 years ago

michiexile commented 9 years ago

Trying to get a package that depends on em-hiredis up and running, I pulled the latest and get the following:

$ irb

require 'em-hiredis' SyntaxError: /Library/Ruby/Gems/1.8/gems/em-hiredis-0.3.0/lib/em-hiredis/client.rb:20: syntax error, unexpected '=', expecting '|' self.send(:define_method, name.to_sym) { |keys, args=[]| ^ /Library/Ruby/Gems/1.8/gems/em-hiredis-0.3.0/lib/em-hiredis/client.rb:22: syntax error, unexpected '}', expecting kEND /Library/Ruby/Gems/1.8/gems/em-hiredis-0.3.0/lib/em-hiredis/client.rb:28: syntax error, unexpected '=', expecting '|' singleton.send(:define_method, name.to_sym) { |keys, args=[]| ^ /Library/Ruby/Gems/1.8/gems/em-hiredis-0.3.0/lib/em-hiredis/client.rb:30: syntax error, unexpected '}', expecting kEND /Library/Ruby/Gems/1.8/gems/em-hiredis-0.3.0/lib/em-hiredis/client.rb:35: syntax error, unexpected tSTAR, expecting tAMPER ..., lua_sha, keys.size, keys, args).callback( ^ /Library/Ruby/Gems/1.8/gems/em-hiredis-0.3.0/lib/em-hiredis/client.rb:39: syntax error, unexpected tSTAR, expecting tAMPER self.eval(lua, keys.size, keys, args) ^ /Library/Ruby/Gems/1.8/gems/em-hiredis-0.3.0/lib/em-hiredis/client.rb:110: syntax error, unexpected $end, expecting kEND from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:inrequire' from /Library/Ruby/Gems/1.8/gems/em-hiredis-0.3.0/lib/em-hiredis.rb:64 from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:36:inrequire' from (irb):1

mloughran commented 9 years ago

Ah yes - ruby 1.8 doesn't support default block arguments which is what that exception is complaining about. One could easily change the code but at this stage I'm very happy to break 1.8 compatibility (it's not even maintained any more) - but I should add a note to that effect to the readme. You must be using a rather old version of OSX?

michiexile commented 9 years ago

On Sep 18, 2014, at 5:45 AM, Martyn Loughran notifications@github.com wrote:

Ah yes - ruby 1.8 doesn't support default block arguments which is what that exception is complaining about. One could easily change the code but at this stage I'm very happy to break 1.8 compatibility (it's not even maintained any more) - but I should add a note to that effect to the readme. You must be using a rather old version of OSX?

A note in the README, maybe even with something like "the latest version to be compatible was X" would be very helpful, yes.

I'm on MacOSX 10.5.8.

Mikael Vejdemo-Johansson mikael@johanssons.org

To see a world in a grain of sand
And a heaven in a wild flower
Hold infinity in the palm of your hand And eternity in an hour - William Blake