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

Conversation

ksylvest
Copy link
Contributor

@ksylvest ksylvest commented Jan 2, 2021

Summary

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 being raised:

Errno::ENOENT (No such file or directory @ rb_sysopen - https://...)

The fixes by calling open through URI.

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 ksylvest changed the title Fix Warning/Error Caused by URI.open instead of open Fix Warning/Error Caused by Using 'open' Instead of 'URI.open' Jan 2, 2021
@ksylvest ksylvest force-pushed the ksylvest/fix-uri-open-warning-and-error branch 2 times, most recently from 28585a0 to 72f6093 Compare January 2, 2021 22:23
@OddEssay
Copy link

I was going to suggest the exact same PR as this after spending way to long trying to pin down the issue in my local build 😅

@BookOfGreg BookOfGreg merged commit c8c57bb into reactjs:master Jun 16, 2021
@BookOfGreg
Copy link
Member

Thanks!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants