⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Ruby master
All Projects
Ruby
»
Ruby master
Overview
Activity
Roadmap
Issues
Repository
Like
Download (409 Bytes)
Bug #9652
ยป timezone_test.rb
Cantin (Cantin Xu)
, 03/19/2014 06:51 AM
class
A
attr_accessor
:time
def
initialize
@times
=
[]
end
def
add
(
time
)
@times
<<
time
end
def
zones
@times
.
map
(
&
:zone
)
end
end
a
=
A
.
new
arr
=
[]
100000
.
times
do
a
.
add
Time
.
new
end
a
=
Marshal
.
load
(
Marshal
.
dump
(
a
))
a
.
zones
.
each_with_index
do
|
zone
,
i
|
#p ">>>>>>>>>>>>#{i}<<<<<<<<<<<<<< #{zone}" if zone != Time.now.zone
arr
<<
zone
if
zone
!=
Time
.
now
.
zone
end
p
arr
(1-1/1)
Loading...