This is an automated email from the ASF dual-hosted git repository. jensg pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git
commit 5a8cd9d1fbb8517915d80b851b4b3434f4ff5ba5 Author: Kengo Seki <[email protected]> AuthorDate: Sun Oct 6 00:13:14 2019 +0900 THRIFT-4971: Fix lib/rb/spec/union_spec.rb so that CI succeeds Client: Ruby Patch: Kengo Seki This closes #1891 --- lib/rb/spec/union_spec.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/rb/spec/union_spec.rb b/lib/rb/spec/union_spec.rb index 0ce6306..efb3853 100644 --- a/lib/rb/spec/union_spec.rb +++ b/lib/rb/spec/union_spec.rb @@ -51,8 +51,7 @@ describe 'Union' do it "should raise for wrong set field when hash initialized and type checking is off" do Thrift.type_checking = false union = SpecNamespace::My_union.new({incorrect_field: :incorrect}) - example = lambda { Thrift::Serializer.new.serialize(union) } - expect(example).to raise_error(RuntimeError, "set_field is not valid for this union!") + expect { Thrift::Serializer.new.serialize(union) }.to raise_error(RuntimeError, "set_field is not valid for this union!") end it "should not be equal to nil" do
