Showing 242 of 1,541 total issues
Class Integer
has 54 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class Integer < Numeric
def self.===(obj)
Rubinius.asm do
int = new_label
done = new_label
Class Stat
has 52 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class Stat
include Comparable
attr_reader :path
Method options
has 169 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def options
@options = Rubinius::Options.new "Usage: configure [options]", 30
o = @options
o.left_align
Method add_install_update_options
has 153 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def add_install_update_options
add_option(:"Install/Update", '-i', '--install-dir DIR',
'Gem repository directory to get installed',
'gems') do |value, options|
options[:install_dir] = File.expand_path(value)
Method validate
has 143 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def validate packaging = true
@warnings = 0
require 'rubygems/user_interaction'
extend Gem::UserInteraction
normalize
Method inspect
has 121 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def inspect
result_encoding = Encoding.default_internal || Encoding.default_external
unless result_encoding.ascii_compatible?
result_encoding = Encoding::US_ASCII
end
Method parse_stream
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def parse_stream(f)
class_pattern = /class\s+([^\s]+)\s*:\s*public\s+([^\s]+)/
slot_pattern = %r!^\s*(\w+)\*?\s+\*?_(\w+)_\s*;\s*//\s*slot(.*)!
accessor_pattern = %r!^\s*attr_(accessor|reader|writer)\((\w+),\s*(\w+)\)!
primitive_pattern = %r%^\s*//\s+Rubinius.primitive([?!\+])?\s+:(.*)\s*$%
Method setup
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def setup
super
@orig_gem_home = ENV['GEM_HOME']
@orig_gem_path = ENV['GEM_PATH']
Method set_index
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def set_index(index, ent, fin=undefined)
Rubinius.primitive :array_aset
Rubinius.check_frozen
Method []=
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def []=(index, count_or_replacement, replacement=undefined)
if undefined.equal?(replacement)
replacement = count_or_replacement
count = nil
else
Method popen
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.popen(*args)
if env = Rubinius::Type.try_convert(args.first, Hash, :to_hash)
args.shift
end
Method initialize
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def initialize(root)
@log = Logger.new "configure.log"
@command_line = ARGV.dup
@log.log "Command line: #{@command_line.join(" ").inspect}"
Method tr_trans
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def tr_trans(source, replacement, squeeze)
source = StringValue(source).dup
replacement = StringValue(replacement).dup
return delete!(source) if replacement.empty?
Method parse
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def parse
@arg_count = 0
@index_mode = nil
atoms = []
Method run
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def run(factory=ERB)
trim_mode = 0
disable_percent = false
begin
while switch = ARGV.switch
Method construct
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def construct(ivar_index = nil, call_proc = true)
type = consume_byte()
obj = case type
when 48 # ?0
nil
Method split
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.split(string, pattern, limit)
# Odd edge case
return [] if string.empty?
tail_empty = false
Method gsub!
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def gsub!(pattern, replacement=undefined)
# Because of the behavior of $~, this is duplicated from gsub! because
# if we call gsub! from gsub, the last_match can't be updated properly.
unless valid_encoding?
Method execute
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def execute
specs = if options[:all] then
Gem::Specification.map
# `--extensions` must be explicitly given to pristine only gems
Method encode!
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def encode!(to=undefined, from=undefined, options=undefined)
Rubinius.check_frozen
case to
when Encoding