From: Bryan Duxbury Date: Thu, 15 Oct 2009 01:20:34 +0000 (+0000) Subject: THRIFT-603. rb: Struct read method does not call validate X-Git-Tag: 0.2.0~23 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=834895d15c8e6761b1dd28401966c39d32954936;p=common%2Fthrift.git THRIFT-603. rb: Struct read method does not call validate After reading a struct, we will now call the struct's validate method. git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@825369 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/lib/rb/ext/struct.c b/lib/rb/ext/struct.c index 31c62d53..7429fb1a 100644 --- a/lib/rb/ext/struct.c +++ b/lib/rb/ext/struct.c @@ -591,6 +591,9 @@ static VALUE rb_thrift_struct_read(VALUE self, VALUE protocol) { // read struct end mt->read_struct_end(protocol); + // call validate + rb_funcall(self, validate_method_id, 0); + return Qnil; }