Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Kernel#eval when called with two arguments will use "(eval)" for __FI…LE__ and 1 for __LINE__ in the evaluated code. #881

Merged

Conversation

JuanCrg90
Copy link
Contributor

From #823

Kernel#eval when called with two arguments will use "(eval)"
for __FILE__ and 1 for __LINE__ in the evaluated code.
[Bug #4352]

-> {
TCPSocket.send(@method, "192.0.2.1", 80, connect_timeout: 0)
}.should raise_error(Errno::ETIMEDOUT)
ruby_version_is "3.0" do
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this block was missing on this commit 66edbec

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks :)

@JuanCrg90 JuanCrg90 force-pushed the add_test_for_kernel_eval_with_two_arguments branch from 2391bbc to 2a2efe6 Compare October 16, 2021 04:56
@@ -182,6 +182,16 @@ class Object
end
end

ruby_version_is "3.0" do
context 'with two arguments ' do
platform_is_not :windows do
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test fails on Windows with this error message 🤔

A child mspec-run process printed unexpected output on STDOUT: "[\"(eval)\", 1]\r\n" while running D:/a/spec/spec/core/kernel/eval_spec.rb

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For mspec -j one cannot print to STDOUT.
The p below is unnecessary and causing that issue, we can just remove it.

@eregon eregon merged commit 8ba758c into ruby:master Oct 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants