File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change 87
87
} . should raise_error ( ArgumentError ) { |e | e . backtrace_locations [ 0 ] . label . should == 'initialize_copy' }
88
88
end
89
89
90
+ it "for Symbol#to_proc" do
91
+ -> {
92
+ :a . to_proc ( :wrong )
93
+ } . should raise_error ( ArgumentError ) { |e | e . backtrace_locations [ 0 ] . label . should == 'to_proc' }
94
+ end
95
+
96
+ it "for BasicObject#instance_eval" do
97
+ -> {
98
+ BasicObject . new . instance_eval
99
+ } . should raise_error ( ArgumentError ) { |e | e . backtrace_locations [ 0 ] . label . should == 'instance_eval' }
100
+ end
101
+
102
+ it "for Module#class_eval" do
103
+ -> {
104
+ Module . new . class_eval
105
+ } . should raise_error ( ArgumentError ) { |e | e . backtrace_locations [ 0 ] . label . should == 'class_eval' }
106
+ end
107
+
108
+ it "for Module#module_eval" do
109
+ -> {
110
+ Module . new . module_eval
111
+ } . should raise_error ( ArgumentError ) { |e | e . backtrace_locations [ 0 ] . label . should == 'module_eval' }
112
+ end
113
+
114
+ it "for Module#define_method" do
115
+ -> {
116
+ Module . new . define_method ( :wrong )
117
+ } . should raise_error ( ArgumentError ) { |e | e . backtrace_locations [ 0 ] . label . should == 'define_method' }
118
+ end
119
+
120
+ it "for Module#instance_method" do
121
+ -> {
122
+ Module . new . instance_method ( [ ] )
123
+ } . should raise_error ( TypeError ) { |e | e . backtrace_locations [ 0 ] . label . should == 'instance_method' }
124
+ end
125
+
90
126
guard -> { RUBY_ENGINE != "ruby" } do
91
127
it "for #send" do
92
128
-> {
You can’t perform that action at this time.
0 commit comments