2009-06-23 まぎらわしい ruby a = "abcdefg" a.slice(2,3) #=> "cde" a[2,3] #=> "cde" a[2..3] #=> "cd" a[2...3] #=> "c"