Skip to content

Commit 30f1512

Browse files
committed
Drop code for Ruby 1.6
1 parent 3cc23ce commit 30f1512

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

bin/racc

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -279,19 +279,13 @@ class RaccProfiler
279279
def initialize(really)
280280
@really = really
281281
@log = []
282-
unless ::Process.respond_to?(:times)
283-
# Ruby 1.6
284-
@class = ::Time
285-
else
286-
@class = ::Process
287-
end
288282
end
289283

290284
def section(name)
291285
if @really
292-
t1 = @class.times.utime
286+
t1 = ::Process.times.utime
293287
result = yield
294-
t2 = @class.times.utime
288+
t2 = ::Process.times.utime
295289
@log.push [name, t2 - t1]
296290
result
297291
else

0 commit comments

Comments
 (0)