Skip to content

Ruby: Active support enumerable #11339

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

Merged
merged 6 commits into from
Dec 5, 2022
Merged

Conversation

aibaars
Copy link
Contributor

@aibaars aibaars commented Nov 21, 2022

No description provided.

@github-actions github-actions bot added the Ruby label Nov 21, 2022
@owen-mc owen-mc changed the title Active support enumerable Ruby: Active support enumerable Nov 22, 2022
@aibaars aibaars force-pushed the active_support_enumerable branch from 7c005ac to f1371f1 Compare November 25, 2022 17:57
@aibaars aibaars marked this pull request as ready for review November 28, 2022 13:00
@aibaars aibaars requested a review from a team as a code owner November 28, 2022 13:00
exists(string s, int i |
s = getKeyArgument(mc, i) and
input = "Argument[self].Element[0].Element[" + s + "!]" and
output = "ReturnValue.Element[" + i + "!]"
Copy link
Contributor

Choose a reason for hiding this comment

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

The ! is not needed here.

override MethodCall getACall() { result = mc }

override predicate propagatesFlowExt(string input, string output, boolean preservesValue) {
input = "Argument[self].Element[0].Element[" + key + "!]" and
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we want the ! here.

override predicate propagatesFlowExt(string input, string output, boolean preservesValue) {
exists(string s, int i |
s = getKeyArgument(mc, i) and
input = "Argument[self].Element[0].Element[" + s + "!]" and
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we want the ! here.

override MethodCall getACall() { result = mc }

override predicate propagatesFlowExt(string input, string output, boolean preservesValue) {
input = "Argument[self].Element[any].Element[" + key + "!]" and
Copy link
Contributor

Choose a reason for hiding this comment

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

Same

Comment on lines 418 to 419
input = "Argument[self].Element[any].Element[" + s + "!]" and
output = "ReturnValue.Element[?].Element[" + i + "!]"
Copy link
Contributor

Choose a reason for hiding this comment

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

Same

@aibaars aibaars force-pushed the active_support_enumerable branch from 265c045 to 6103c57 Compare November 30, 2022 11:02
@aibaars aibaars merged commit 8342385 into github:main Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants