Skip to content

Commit

Permalink
Rubocop autocorrected: Style/ElseAlignment
Browse files Browse the repository at this point in the history
  • Loading branch information
mvidner committed Jun 5, 2015
1 parent 08b682e commit 334b3ef
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
5 changes: 0 additions & 5 deletions .rubocop.yml
Expand Up @@ -113,11 +113,6 @@ Style/DoubleNegation:
Style/EachWithObject:
Enabled: false

# Offense count: 4
# Cop supports --auto-correct.
Style/ElseAlignment:
Enabled: false

# Offense count: 1
Style/EmptyElse:
Enabled: false
Expand Down
4 changes: 2 additions & 2 deletions src/ruby/yast/builtins.rb
Expand Up @@ -352,7 +352,7 @@ def self.reduce *params, &block
list = if params.size == 2 #so first is default and second is list
return nil if params[1].nil?
[params.first].concat(Yast.deep_copy(params[1]))
else
else
params.first
end
return Yast.deep_copy(list).reduce &block
Expand Down Expand Up @@ -437,7 +437,7 @@ def self.sort array, &block

res = if block_given?
array.sort { |x,y| block.call(x,y) ? -1 : 1 }
else
else
array.sort {|x,y| Yast::Ops.comparable_object(x) <=> y }
end

Expand Down
4 changes: 2 additions & 2 deletions src/ruby/yast/yast.rb
Expand Up @@ -146,7 +146,7 @@ def self.import(mname)
modules[0..-2].each do |module_|
tmp_m = if base.constants.include?(module_.to_sym)
base.const_get(module_)
else
else
base.const_set(module_, ::Module.new)
end
base = tmp_m
Expand All @@ -169,7 +169,7 @@ def self.import(mname)

m = if base.constants.include?(modules.last.to_sym)
base.const_get(modules.last)
else
else
::Module.new
end
symbols(mname).each do |sname,stype|
Expand Down

0 comments on commit 334b3ef

Please sign in to comment.