#! /usr/bin/ruby
# encoding:gbk
nums = Array.new(10) { |e| e = e * 2 }
def test(paraList)
$i = 0
$num = 30
for i in 0...$num
if i == 2 || i == 3
next
end
puts "局部变量为 #{i}"
end
end
test "#{nums}"
# encoding:gbk
nums = Array.new(10) { |e| e = e * 2 }
def test(paraList)
$i = 0
$num = 30
for i in 0...$num
if i == 2 || i == 3
next
end
puts "局部变量为 #{i}"
end
end
test "#{nums}"