文字列を1/2の確立で出し分けるスニペットです
#文字列置換
tempple = ["A","B"]
temp = "て{0}すと"
puts temp.gsub("{0}",tempple[rand(2)].chomp).encode("Shift_JIS")
i=2
p i
i+=3
p i
j=0
j+=i
p j
j+=i
p j
The other day, Team Y was at Trampoland and it looked like fun, so I looked for a nearby place to try trampolining and found just the right facility nearby. We went there at 10:00 a.m. today. I hadn't exercised in a long time and too strenuous a workout, and I hurt my cervical spine.