aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Alexander Polcyn <apolcyn@google.com>2017-03-19 23:36:21 -0700
committerGravatar Alexander Polcyn <apolcyn@google.com>2017-03-19 23:36:21 -0700
commitb862b6ae205628d7713ee2e4cbb752206cf0b1f6 (patch)
tree3318b858045eb0b26fe7fa812b6c95cf585ad2ed
parent071f74f6f13bc806169e0d3c5ca947e3b9b0605d (diff)
use RTEST with channel watch arg to capture larger set of truthy args
-rw-r--r--src/ruby/ext/grpc/rb_channel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ruby/ext/grpc/rb_channel.c b/src/ruby/ext/grpc/rb_channel.c
index 3b1111e5e2..1fe825efd6 100644
--- a/src/ruby/ext/grpc/rb_channel.c
+++ b/src/ruby/ext/grpc/rb_channel.c
@@ -234,7 +234,7 @@ static VALUE grpc_rb_channel_get_connectivity_state(int argc, VALUE *argv,
/* "01" == 0 mandatory args, 1 (try_to_connect) is optional */
rb_scan_args(argc, argv, "01", &try_to_connect_param);
- grpc_try_to_connect = try_to_connect_param == Qtrue ? 1 : 0;
+ grpc_try_to_connect = RTEST(try_to_connect_param) ? 1 : 0;
TypedData_Get_Struct(self, grpc_rb_channel, &grpc_channel_data_type, wrapper);
ch = wrapper->wrapped;