diff options
author | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-20 20:38:57 +0000 |
---|---|---|
committer | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-20 20:38:57 +0000 |
commit | 6204e0804b24f1675b49d5880da014411bcfb831 (patch) | |
tree | ce6c00bf078fc416936ca3cdc972b9b3c1c78dae /spec/ruby/optional/capi/class_spec.rb | |
parent | 58573c33e4720315ed27491e31dcc22892e1ce95 (diff) |
Update to ruby/spec@35a9fba
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/ruby/optional/capi/class_spec.rb')
-rw-r--r-- | spec/ruby/optional/capi/class_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/ruby/optional/capi/class_spec.rb b/spec/ruby/optional/capi/class_spec.rb index bab4f52831..a4dac6707a 100644 --- a/spec/ruby/optional/capi/class_spec.rb +++ b/spec/ruby/optional/capi/class_spec.rb @@ -109,6 +109,16 @@ describe "C-API Class function" do end end + describe "rb_define_method" do + it "defines a method taking variable arguments as a C array if the argument count is -1" do + @s.rb_method_varargs_1(1, 3, 7, 4).should == [1, 3, 7, 4] + end + + it "defines a method taking variable arguments as a Ruby array if the argument count is -2" do + @s.rb_method_varargs_2(1, 3, 7, 4).should == [1, 3, 7, 4] + end + end + describe "rb_class2name" do it "returns the class name" do @s.rb_class2name(CApiClassSpecs).should == "CApiClassSpecs" |