Skip to content

Commit acb2e2b

Browse files
committed
Remove unused TopLevel#last_modified
1 parent 870134a commit acb2e2b

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed

lib/rdoc/code_object/top_level.rb

-15
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ class RDoc::TopLevel < RDoc::Context
66

77
MARSHAL_VERSION = 0 # :nodoc:
88

9-
##
10-
# This TopLevel's File::Stat struct
11-
12-
attr_accessor :file_stat
13-
149
##
1510
# Relative name of this file
1611

@@ -43,7 +38,6 @@ def initialize absolute_name, relative_name = absolute_name
4338
@name = nil
4439
@absolute_name = absolute_name
4540
@relative_name = relative_name
46-
@file_stat = File.stat(absolute_name) rescue nil # HACK for testing
4741
@parser = nil
4842

4943
@classes_or_modules = []
@@ -183,13 +177,6 @@ def inspect # :nodoc:
183177
]
184178
end
185179

186-
##
187-
# Time this file was last modified, if known
188-
189-
def last_modified
190-
@file_stat ? file_stat.mtime : nil
191-
end
192-
193180
##
194181
# Dumps this TopLevel for use by ri. See also #marshal_load
195182

@@ -210,8 +197,6 @@ def marshal_load array # :nodoc:
210197

211198
@parser = array[2]
212199
@comment = RDoc::Comment.from_document array[3]
213-
214-
@file_stat = nil
215200
end
216201

217202
##

test/rdoc/test_rdoc_top_level.rb

-8
Original file line numberDiff line numberDiff line change
@@ -162,14 +162,6 @@ def test_http_url
162162
assert_equal 'path_other/level_rb.html', other_level.http_url
163163
end
164164

165-
def test_last_modified
166-
assert_nil @top_level.last_modified
167-
stat = Object.new
168-
def stat.mtime() 0 end
169-
@top_level.file_stat = stat
170-
assert_equal 0, @top_level.last_modified
171-
end
172-
173165
def test_marshal_dump
174166
page = @store.add_file 'README.txt'
175167
page.parser = RDoc::Parser::Simple

0 commit comments

Comments
 (0)