源代码:
#!/usr/bin/ruby # -*- coding: UTF-8 -*- def test i = 100 j = 200 k = 300 return i, j, k end var = test puts var
运行结果:
#!/usr/bin/ruby # -*- coding: UTF-8 -*- def test i = 100 j = 200 k = 300 return i, j, k end var = test puts var