Skip to content
Permalink
Browse files
use unless instead of if not.
  • Loading branch information
matz committed Jun 21, 2017
1 parent d0a7e01 commit 057be5ffb55dbcdb1a982da4762fc3fc8c568705
Showing 3 changed files with 3 additions and 3 deletions.
@@ -69,7 +69,7 @@ def select(&block)

def reject(&block)
Lazy.new(self){|yielder, val|
if not block.call(val)
unless block.call(val)
yielder << val
end
}
@@ -133,7 +133,7 @@ def sub(*args, &block)
if args.length == 2 && block
block = nil
end
if !block
unless block
replace = replace.to_str
end
result = []
@@ -157,7 +157,7 @@ def assert_raise(*exp)
msg = "#{msg}#{exp.inspect} exception expected, not"
diff = " Class: <#{e.class}>\n" +
" Message: #{e.message}"
if not exp.any?{|ex| ex.instance_of?(Module) ? e.kind_of?(ex) : ex == e.class }
unless exp.any?{|ex| ex.instance_of?(Module) ? e.kind_of?(ex) : ex == e.class }
$mrbtest_assert.push([$mrbtest_assert_idx, msg, diff])
ret = false
end

0 comments on commit 057be5f

Please sign in to comment.