FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Stop using deprecated File.exists? by dgsuarez · Pull Request #457 · vim-ruby/vim-ruby · GitHub

Stop using deprecated File.exists? - #457

Merged
AndrewRadev merged 1 commit into
vim-ruby:masterfrom
dgsuarez:master
Sep 8, 2023
Merged

AndrewRadev merged 1 commit into
vim-ruby:masterfrom
dgsuarez:master

Conversation

dgsuarez commented Sep 8, 2023

Copy link
Copy Markdown
Contributor

Hello!

Just a quick fix on the Ruby code.

File.exists? was removed on Ruby 3.2.0:

So if you let g:rubycomplete_rails=1 and C-X C-O

Error detected while processing function rubycomplete#Complete[22]..provider#ruby#Call[17]..rubycomplete#Complete:
line   22:
NoMethodError: undefined method `exists?' for File:Class

The PR just uses File.exist? instead. Method does the same and has been present at least since Ruby 1.8.6:

Copy link
Copy Markdown
Member

Makes sense, thanks 👍

AndrewRadev merged commit e1c1159 into vim-ruby:master Sep 8, 2023

dkearns commented Sep 8, 2023

Copy link
Copy Markdown
Member

Thanks, I'll add this to the Vim-9.1 release.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL