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

Fixed functionality of #from_file within non-main Ractors, #170 #171

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

TheHashTableSlasher
Copy link

See issue #170 for more information. I tried to provide a useful spec to test this, but I'm pretty busy and didn't have time to set up a whole thing on the PC that I'm writing this from, so you may want to move it somewhere else or something.

Copy link
Owner

@wvanbergen wvanbergen left a comment

Choose a reason for hiding this comment

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

Nice, thanks for this contribution. I think I prefer the freeze approach - it's a good idea to freeze those constants for other reasons besides Ractors. So I'll merge this PR.

@wvanbergen
Copy link
Owner

Looks like the test suite is showing some bitrot, but one failure seems to be related to this change:

/home/runner/work/chunky_png/chunky_png/spec/chunky_png/canvas_spec.rb:242:in `block (3 levels) in <top (required)>': undefined method `resource_file' for #<Ractor:#2 /home/runner/work/chunky_png/chunky_png/spec/chunky_png/canvas_spec.rb:242 running> (NoMethodError)

    img = Ractor.new { ChunkyPNG::Canvas.from_file(resource_file("operations.png")) }.take

Looks like the resource_file is not available in the Ractor context - can you look into it?

Just pass the filename :P
@TheHashTableSlasher
Copy link
Author

Sorry, never used RSpec before. It oughtta work now though.

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.

2 participants