ruby格式化

str = "%i+2"
str1 = str % [3]
count = 3
m = eval("%i+2" % [count]) 
puts m

posted on 2010-11-20 16:20  张飞_  阅读(395)  评论(0编辑  收藏  举报

导航