Mega Code Archive
Categories
/
Ruby
/
Array
Change character case of an element
a = ['a','b','c'] a[2].upcase! a.fill(2..4) { 'b' } a[2].upcase!