aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ruby
diff options
context:
space:
mode:
authorGravatar Tim Emiola <temiola@google.com>2015-02-09 11:26:05 -0800
committerGravatar Tim Emiola <temiola@google.com>2015-02-09 11:26:05 -0800
commitc3ac185491e5fc79c34793e44edb42ff86049279 (patch)
tree75785e7d3c386172c92c948d50766b5f83f2ea2e /src/ruby
parentee8f51fc8be1d48f98f57823523a9b36ee1edbba (diff)
Fixes a event compiler error
Diffstat (limited to 'src/ruby')
-rw-r--r--src/ruby/ext/grpc/rb_event.c11
-rw-r--r--src/ruby/spec/event_spec.rb4
2 files changed, 3 insertions, 12 deletions
diff --git a/src/ruby/ext/grpc/rb_event.c b/src/ruby/ext/grpc/rb_event.c
index a1ab6251c8..72c9dd2ec0 100644
--- a/src/ruby/ext/grpc/rb_event.c
+++ b/src/ruby/ext/grpc/rb_event.c
@@ -256,14 +256,6 @@ static VALUE grpc_rb_event_result(VALUE self) {
event->data.finish_accepted);
break;
- case GRPC_INVOKE_ACCEPTED:
- if (event->data.invoke_accepted == GRPC_OP_OK) {
- return Qnil;
- }
- rb_raise(rb_eEventError, "invoke failed, not sure why (code=%d)",
- event->data.invoke_accepted);
- break;
-
case GRPC_WRITE_ACCEPTED:
if (event->data.write_accepted == GRPC_OP_OK) {
return Qnil;
@@ -343,9 +335,8 @@ void Init_google_rpc_event() {
rb_define_module_under(rb_mGoogleRpcCore, "CompletionType");
rb_define_const(rb_mCompletionType, "QUEUE_SHUTDOWN",
INT2NUM(GRPC_QUEUE_SHUTDOWN));
+ rb_define_const(rb_mCompletionType, "OP_COMPLETE", INT2NUM(GRPC_OP_COMPLETE));
rb_define_const(rb_mCompletionType, "READ", INT2NUM(GRPC_READ));
- rb_define_const(rb_mCompletionType, "INVOKE_ACCEPTED",
- INT2NUM(GRPC_INVOKE_ACCEPTED));
rb_define_const(rb_mCompletionType, "WRITE_ACCEPTED",
INT2NUM(GRPC_WRITE_ACCEPTED));
rb_define_const(rb_mCompletionType, "FINISH_ACCEPTED",
diff --git a/src/ruby/spec/event_spec.rb b/src/ruby/spec/event_spec.rb
index 7ef08d021b..89acd4ba67 100644
--- a/src/ruby/spec/event_spec.rb
+++ b/src/ruby/spec/event_spec.rb
@@ -33,8 +33,8 @@ describe GRPC::Core::CompletionType do
before(:each) do
@known_types = {
QUEUE_SHUTDOWN: 0,
- READ: 1,
- INVOKE_ACCEPTED: 2,
+ OP_COMPLETE: 1,
+ READ: 2,
WRITE_ACCEPTED: 3,
FINISH_ACCEPTED: 4,
CLIENT_METADATA_READ: 5,