Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix mistakes in MVar documentation#1087

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@trinistr
Copy link
Contributor

Fixes a couple of mistakes in documentation:

  • #modify's documentationvery incorrectly said that it returns modified value, when that's not the case;
  • class's docs referenced#mutate instead of#modify;
  • typo in a comment.

Additionally, links to README and CHANGELOG are fixed in contributing guidelines, previously they linked to non-existent files.

####Write Documentation

Document any external behavior in the[README](README.md).
Document any external behavior in the[README](/README.md).
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Document any external behavior in the[README](/README.md).
Document any external behavior in the[README](../README.md).

/README.md doesn't seem to work, on GitHub at least, same below of course

Copy link
ContributorAuthor

@trinistrtrinistrJul 6, 2025
edited
Loading

Choose a reason for hiding this comment

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

Hmm, weird, it did work for me when I viewed CONTRIBUTING.md in the repository.

Fixed.

# be set to limit the time spent blocked, in which case it returns `TIMEOUT`
# if the time is exceeded.
# @return [Object] thetransformed value, or `TIMEOUT`
# @return [Object] thepre-transform value, or `TIMEOUT`
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if instead the code should return the transformed value.
But looking at

it'returns the unmodified value'do
m=MVar.new(14)
expect(m.modify{ |v|v +2}).toeq14
end
it seems not, so indeed the doc change seems correct then.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Actually, I noticed the problem because the documented behavior seemed weird, as getting previous value would be hard in many cases, and it did not follow the "set and get" pattern.

@trinistrtrinistrforce-pushed thefix-mvar-documentation branch from492a58c toa58b093CompareJuly 6, 2025 14:16
@trinistrtrinistrforce-pushed thefix-mvar-documentation branch froma58b093 to2c815dbCompareJuly 6, 2025 14:17
@eregoneregon merged commit52f0ee4 intoruby-concurrency:masterJul 7, 2025
16 checks passed
@trinistrtrinistr deleted the fix-mvar-documentation branchJuly 8, 2025 07:42
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@eregoneregoneregon approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@trinistr@eregon

[8]ページ先頭

©2009-2025 Movatter.jp