summaryrefslogtreecommitdiffhomepage
path: root/test/t/argumenterror.rb
AgeCommit message (Collapse)Author
2021-11-26Check more `MRB_ARGS_NONE()`dearblue
The `__id__` method implemented in the C function has `MRB_ARGS_NONE()` specified, but it is also effective in the following cases. ```ruby p nil.__id__ opts: 1 rescue p :a p nil.method(:__id__).call 1 rescue p :b p nil.method(:__id__).call opts: 1 rescue p :c p nil.method(:__id__).to_proc.call 1 rescue p :d p nil.method(:__id__).to_proc.call opts: 1 rescue p :e p nil.method(:__id__).unbind.bind_call nil, 1 rescue p :f p nil.method(:__id__).unbind.bind_call nil, opts: 1 rescue p :g p nil.__send__ :__id__, 1 rescue p :h p nil.__send__ :__id__, opts: 1 rescue p :i ``` After applying this patch, all items will output symbols in the same way as CRuby. For this purpose, add `MRB_PROC_NOARG` to `struct RProc::flags`.
2021-01-02Refine "wrong number of arguments" message in `mrb_get_args`KOBAYASHI Shuji
#### Before this patch: ```ruby __send__ #=> wrong number of arguments {}.default(1,2) #=> wrong number of arguments ``` #### After this patch: ```ruby __send__ #=> wrong number of arguments (given 0, expected 1+) {}.default(1,2) #=> wrong number of arguments (given 2, expected 0..1) ```
2014-06-15Move direct superclass checking to `test/t/superclass.rb`.take_cheeze
2013-08-01Fix order of actual and expect test value for ArgumentErrorDaniel Bovensiepen
2013-06-09Improve ArgumentError testsDaniel Bovensiepen
2012-06-03Add superclass tests for ExceptionsDaniel Bovensiepen
2012-05-29Add Test cases for Literals, Enumeration, Exceptions and clean line endingsDaniel Bovensiepen
2012-05-25Add Tests for all Exception classes, for false, true, Proc, Module, nil and ↵Daniel Bovensiepen
Object