源代码:
#!/usr/bin/ruby # -*- coding: UTF-8 -*- (0..5).each do |i| puts "局部变量的值为 #{i}" end
运行结果:
#!/usr/bin/ruby # -*- coding: UTF-8 -*- (0..5).each do |i| puts "局部变量的值为 #{i}" end