掃碼下載編程獅APP
#!/usr/bin/ruby -w # -*- coding: UTF-8 -*- time1 = Time.new puts "當(dāng)前時間 : " + time1.inspect # Time.now 功能相同 time2 = Time.now puts "當(dāng)前時間 : " + time2.inspect