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

Consider using rb_yield_values instead of rb_yield_splat #54

Closed
ged opened this issue Dec 2, 2010 · 2 comments
Closed

Consider using rb_yield_values instead of rb_yield_splat #54

ged opened this issue Dec 2, 2010 · 2 comments

Comments

@ged
Copy link
Owner

ged commented Dec 2, 2010

Original report by Anonymous.


On line 2178 of pg.c, rb_yield_splat is used in combination with rb_ary_new3 (http://bitbucket.org/ged/ruby-pg/src/eb0d4b1df418/ext/pg.c#cl-2178).

Wouldn't changing line 2178 to be:

rb_yield_values(3, relname, be_pid, extra);

make sense? It should be functionally equivalent and faster. Also, rb_yield_splat isn't supported by rubinius 1.1.1.

@ged
Copy link
Owner Author

ged commented Dec 6, 2010

Original comment by Michael Granger (Bitbucket: ged, GitHub: ged).


Apparently so. I chose rb_yield_splat() so it wouldn't be strict about the arity of the block it could yield to, but rb_yield_values() seems to work the same way. I'll change it for the next release.

@ged
Copy link
Owner Author

ged commented Dec 6, 2010

Original comment by Michael Granger (Bitbucket: ged, GitHub: ged).


Change rb_yield_splat() to rb_yield_values() for compatibility with Rubinius. (fixes #54)

@ged ged closed this as completed Dec 6, 2010
@ged ged added this to the Pending milestone Oct 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant