We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9862b65 commit 88a12daCopy full SHA for 88a12da
test_arrays.rb
@@ -117,10 +117,8 @@
117
118
# .collect - essentially an each-do for modifying all elements in an array:
119
a1 = %w[a d ez]
120
-puts a1.collect { |x| x + "cheeseburger" }.join(", ")
+puts a1.collect { |foo| foo + "cheeseburger" }.join(", ")
121
puts a1.join(", ")
122
# Above, no permanent alterations. Below, permanent alterations:
123
-puts a1.collect! { |x| x + "cheeseburger" }.join(", ")
124
-puts a1.join(", ")
125
-
126
-puts
+puts a1.collect! { |foo| foo + "cheeseburger" }.join(", ")
+puts a1.join(", "), "\n"
0 commit comments