Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

private method `link' called for #<SimpleRSS:0x9aaf59c> in ruby 1.9.2 #6

Open
murugaraj opened this issue Oct 29, 2010 · 1 comment

Comments

@murugaraj
Copy link

In ruby 1.9.2 Calling rss.channel.link or rss.channel.title throwing the below error.

Please Fix.

ruby-1.9.2-p0 > rss.channel.link
NoMethodError: private method link' called for #<SimpleRSS:0x9aaf59c> from (irb):29 from /home/dckap/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0/lib/rails/commands/console.rb:44:instart'
from /home/dckap/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0/lib/rails/commands/console.rb:8:in start' from /home/dckap/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0/lib/rails/commands.rb:23:in<top (required)>'
from script/rails:6:in require' from script/rails:6:in

'
ruby-1.9.2-p0 > rss.channel.title
NoMethodError: private method title' called for #<SimpleRSS:0x9aaf59c> from (irb):30 from /home/dckap/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0/lib/rails/commands/console.rb:44:instart'
from /home/dckap/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0/lib/rails/commands/console.rb:8:in start' from /home/dckap/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0/lib/rails/commands.rb:23:in<top (required)>'
from script/rails:6:in require' from script/rails:6:in'

@eeewxj
Copy link

eeewxj commented May 1, 2012

hi,I have found the point.You need to change file "simple-rss.rb"
In ruby 1.9.2 ,when you add method to class in the scope of "private", the method will be private.
So if you shift line 72,ie 'private' to line 137 after method 'parse',it works well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants