core/alpha.rb
File alpha.rb
has 391 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
class NilClass
def nil?
true
end
Class Module
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class Module
def method_table ; @method_table ; end
def constant_table ; @constant_table ; end
def name ; @module_name.to_s ; end
def origin ; @origin ; end
Method alias_method
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Open
def alias_method(new_name, current_name)
Rubinius::VM.reset_method_cache self, new_name
# If we're aliasing a method we contain, just reference it directly, no
# need for the alias wrapper
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method store
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def store(name, method_id, exec, scope, serial, visibility)
Method alias
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def alias(name, visibility, original_name, original_exec, original_mod)