File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed
src/main/ruby/truffleruby/core Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ Compatibility:
23
23
* Implement ` Complex#<=> ` (#2004 , @ssnickolay ).
24
24
* Add warning for ` proc ` without block (#2004 , @ssnickolay ).
25
25
* Implemented ` FrozenError#receiver ` .
26
+ * ` Proc#<< ` and ` Proc#>> ` raises TypeError if passed not callable object (#2004 , @ssnickolay ).
26
27
27
28
Performance:
28
29
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -105,6 +105,8 @@ def to_proc
105
105
end
106
106
107
107
def >>( other )
108
+ raise ( TypeError , 'callable object is expected' ) unless other . respond_to? ( :call )
109
+
108
110
if lambda?
109
111
-> ( *args , &block ) do
110
112
other . call ( call ( *args , &block ) )
@@ -117,6 +119,8 @@ def >>(other)
117
119
end
118
120
119
121
def <<( other )
122
+ raise ( TypeError , 'callable object is expected' ) unless other . respond_to? ( :call )
123
+
120
124
if lambda?
121
125
-> ( *args , &block ) do
122
126
call ( other . call ( *args , &block ) )
Original file line number Diff line number Diff line change 26
26
exclude :test_proc_args_rest_post , "needs investigation"
27
27
exclude :test_proc_args_rest_post_block , "needs investigation"
28
28
exclude :test_safe , "needs investigation"
29
- exclude :test_compose_with_noncallable , "needs investigation"
30
29
exclude :test_orphan_return , "needs investigation"
31
30
exclude :test_proc_lambda , "needs investigation"
32
31
exclude :test_proc_autosplat , "needs investigation"
You can’t perform that action at this time.
0 commit comments