You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 6, 2022. It is now read-only.
Whenever I make a call to addthis_feed_button in ruby 1.9.1, I'm getting errors.
For example, with this :
<%= addthis_feed_button("http://www.example.com/")%>
I'm getting : invalid value for Integer: ":"
C:/Ruby19/lib/ruby/gems/1.9.1/gems/jaap3-addthis-0.8.0/lib/addthis.rb:44:in sprintf' C:/Ruby19/lib/ruby/gems/1.9.1/gems/jaap3-addthis-0.8.0/lib/addthis.rb:44:inblock in addthis_feed_button'
C:/Ruby19/lib/ruby/gems/1.9.1/gems/jaap3-addthis-0.8.0/lib/addthis.rb:44:in gsub' C:/Ruby19/lib/ruby/gems/1.9.1/gems/jaap3-addthis-0.8.0/lib/addthis.rb:44:inaddthis_feed_button'
The problem is related to the way that ruby 1.9 is handling Strings#[]. The solution for ruby 1.9 is to use c[0].ord instead of c[0] in line 44 of addthis.rb
Whenever I make a call to addthis_feed_button in ruby 1.9.1, I'm getting errors.
For example, with this :
<%= addthis_feed_button("http://www.example.com/")%>
I'm getting : invalid value for Integer: ":"
C:/Ruby19/lib/ruby/gems/1.9.1/gems/jaap3-addthis-0.8.0/lib/addthis.rb:44:in
sprintf' C:/Ruby19/lib/ruby/gems/1.9.1/gems/jaap3-addthis-0.8.0/lib/addthis.rb:44:inblock in addthis_feed_button'C:/Ruby19/lib/ruby/gems/1.9.1/gems/jaap3-addthis-0.8.0/lib/addthis.rb:44:in
gsub' C:/Ruby19/lib/ruby/gems/1.9.1/gems/jaap3-addthis-0.8.0/lib/addthis.rb:44:inaddthis_feed_button'The problem is related to the way that ruby 1.9 is handling Strings#[]. The solution for ruby 1.9 is to use c[0].ord instead of c[0] in line 44 of addthis.rb
Mehdi