简单教程
提交运行
代码编辑器:
# !/usr/bin/ruby -w # -*- encoding:utf-8 -*- # filename: main.rb # author: 简单教程(www.twle.cn) # Copyright © 2015-2065 www.twle.cn. All rights reserved. t1 = Time.new puts "当前时间 : " + t1.inspect t2 = Time.now puts "当前时间 : " + t2.inspect
运行结果: