Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix Warning/Error Caused by Using 'open' Instead of 'URI.open' #1099

Merged

Commits on Jan 2, 2021

  1. Use URI.open instead of open

    Using open via the following snippet:
    
        require 'open-uri'
        open('https//...')
    
    In ruby 2 results in the following deprecation warning:
    
        warning: calling URI.open via Kernel#open is deprecated
        call URI.open directly or use URI#open
    
    In ruby 3 results in the following exception:
    
        Errno::ENOENT (No such file or directory @ rb_sysopen - https://...)
    
    The fixes by calling open through URI.
    ksylvest committed Jan 2, 2021
    Configuration menu
    Copy the full SHA
    72f6093 View commit details
    Browse the repository at this point in the history