From: Josselin Date: 2006-10-20T17:00:12+09:00 Subject: filling an array excepted first and last position... ldom = 30 # variable (last day of a month...) # array init to 0 @obk = [] 1.step(ldom, 1) do |i| @obk[i] = 0 end I am filling an array as follows (part of a larger filling scheme) : ---- #fiiling the array upon another array content # but I'd like to AVOID filling the first and last position in this loop.... obdays.each do |bd| @obk[bd] = 1 end ------ # ajusting first and last position (in the larger scheme) @obk[obdays.first] += -1 @obk[obdays.last] += -2