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

Error: Cannot get class name from s(:self) (RuntimeError) #42

Closed
lukasztackowiak opened this issue Feb 2, 2012 · 1 comment
Closed

Comments

@lukasztackowiak
Copy link

Whole stactrace below:

[Notice] Detected Rails 3 application
Loading scanner...
[Notice] Using Ruby 1.9.2. Please make sure this matches the one used to run your Rails application.
Processing application in /home/projects/ringadoc
Processing configuration...
[Notice] Escaping HTML by default
Processing gems...
Processing initializers...
Processing libs...
[Skipping]
Processing routes...
Processing templates...
Processing data flow in templates...
Processing models...
Processing controllers...
Processing data flow in controllers...
Indexing call sites...      
/home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/gems/brakeman-1.2.2/lib/brakeman/processors/lib/processor_helper.rb:28:in `class_name': Error: Cannot get class name from s(:self) (RuntimeError)
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/gems/brakeman-1.2.2/lib/brakeman/processors/lib/processor_helper.rb:22:in `class_name'
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/gems/brakeman-1.2.2/lib/brakeman/processors/lib/find_all_calls.rb:123:in `get_target'
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/gems/brakeman-1.2.2/lib/brakeman/processors/lib/find_all_calls.rb:43:in `process_call'
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/gems/sexp_processor-3.0.10/lib/sexp_processor.rb:209:in `block (2 levels) in process'
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/gems/sexp_processor-3.0.10/lib/sexp_processor.rb:261:in `error_handler'
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/gems/sexp_processor-3.0.10/lib/sexp_processor.rb:208:in `block in process'
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/gems/sexp_processor-3.0.10/lib/sexp_processor.rb:326:in `in_context'
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/gems/sexp_processor-3.0.10/lib/sexp_processor.rb:180:in `process'
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/gems/brakeman-1.2.2/lib/brakeman/processors/lib/find_all_calls.rb:36:in `block in process_rlist'
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/gems/brakeman-1.2.2/lib/brakeman/processors/lib/find_all_calls.rb:35:in `each'
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/gems/brakeman-1.2.2/lib/brakeman/processors/lib/find_all_calls.rb:35:in `process_rlist'
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/gems/sexp_processor-3.0.10/lib/sexp_processor.rb:209:in `block (2 levels) in process'
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/gems/sexp_processor-3.0.10/lib/sexp_processor.rb:261:in `error_handler'
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/gems/sexp_processor-3.0.10/lib/sexp_processor.rb:208:in `block in process'
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/gems/sexp_processor-3.0.10/lib/sexp_processor.rb:326:in `in_context'
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/gems/sexp_processor-3.0.10/lib/sexp_processor.rb:180:in `process'
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/gems/brakeman-1.2.2/lib/brakeman/processors/lib/find_all_calls.rb:30:in `process_selfdef'
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/gems/sexp_processor-3.0.10/lib/sexp_processor.rb:209:in `block (2 levels) in process'
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/gems/sexp_processor-3.0.10/lib/sexp_processor.rb:261:in `error_handler'
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/gems/sexp_processor-3.0.10/lib/sexp_processor.rb:208:in `block in process'
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/gems/sexp_processor-3.0.10/lib/sexp_processor.rb:326:in `in_context'
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/gems/sexp_processor-3.0.10/lib/sexp_processor.rb:180:in `process'
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/gems/brakeman-1.2.2/lib/brakeman/processors/lib/find_all_calls.rb:20:in `process_source'
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/gems/brakeman-1.2.2/lib/brakeman/tracker.rb:145:in `block in index_call_sites'
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/gems/brakeman-1.2.2/lib/brakeman/tracker.rb:75:in `block (4 levels) in each_method'
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/gems/brakeman-1.2.2/lib/brakeman/tracker.rb:70:in `each'
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/gems/brakeman-1.2.2/lib/brakeman/tracker.rb:70:in `block (3 levels) in each_method'
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/gems/brakeman-1.2.2/lib/brakeman/tracker.rb:69:in `each'
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/gems/brakeman-1.2.2/lib/brakeman/tracker.rb:69:in `block (2 levels) in each_method'
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/gems/brakeman-1.2.2/lib/brakeman/tracker.rb:68:in `each'
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/gems/brakeman-1.2.2/lib/brakeman/tracker.rb:68:in `block in each_method'
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/gems/brakeman-1.2.2/lib/brakeman/tracker.rb:67:in `each'
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/gems/brakeman-1.2.2/lib/brakeman/tracker.rb:67:in `each_method'
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/gems/brakeman-1.2.2/lib/brakeman/tracker.rb:144:in `index_call_sites'
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/gems/brakeman-1.2.2/lib/brakeman/scanner.rb:356:in `index_call_sites'
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/gems/brakeman-1.2.2/lib/brakeman/scanner.rb:71:in `process'
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/gems/brakeman-1.2.2/lib/brakeman.rb:241:in `scan'
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/gems/brakeman-1.2.2/lib/brakeman.rb:55:in `run'
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/gems/brakeman-1.2.2/bin/brakeman:45:in `<top (required)>'
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/bin/brakeman:19:in `load'
    from /home/ltackowiak/.rvm/gems/ruby-1.9.2-p290@ringadoc/bin/brakeman:19:in `<main>'
@presidentbeef
Copy link
Owner

Hi Łukasz,

Thank you for reporting this issue. This is an exception which should have been handled.

Do you have code that looks like this?

self::SomeConstant.some_method

Repository owner locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants