Skip to content

Commit 2fb35f9

Browse files
committed
adds eval patch to File
1 parent 7c90896 commit 2fb35f9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/rex.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,10 @@ def select(rfd = nil, wfd = nil, efd = nil, to = nil)
110110
Rex::ThreadSafe.select(rfd, wfd, efd, to)
111111
end
112112
EOF
113+
114+
# Add the deprecated File.exists? method to call non-deprecated File.exist?
115+
File.class_eval(<<-EOF, __FILE__, __LINE__ + 1)
116+
def File.exists?(fname)
117+
File.exist?(fname)
118+
end
119+
EOF

0 commit comments

Comments
 (0)