Skip to content

Commit 81891e5

Browse files
author
Simon Siegert
committed
Add rubocop testfiles
1 parent 1a54e7c commit 81891e5

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

fix-with-rubocop/dirty.rb

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
def dirty_method
2+
puts "incorrect number of spaces (3)"
3+
end
4+
5+
#emptying array can be improved by using until
6+
test_array = [ 'T', 'E', 'S', 'T' ]
7+
print(test_array.pop, " ") while test_array.size > 0
8+
print "\n"

fix-with-rubocop/dirtyUnfixable.rb

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
testArray = %w[T E S T]
2+

0 commit comments

Comments
 (0)