push
1903 of 2443 relevant lines covered (77.9%)
541.94 hits per line
| 1 |
module Concurrent |
1✔ |
| 2 |
class ImmediateExecutor |
1✔ |
| 3 |
|
|
| 4 |
def post(*args, &task) |
1✔ |
| 5 |
raise ArgumentError.new('no block given') unless block_given? |
54✔ |
| 6 |
task.call(*args) |
54✔ |
| 7 |
true
|
54✔ |
| 8 |
end
|
|
| 9 |
|
|
| 10 |
def <<(task) |
1✔ |
| 11 |
post(&task) |
× |
| 12 |
self
|
× |
| 13 |
end
|
|
| 14 |
end
|
|
| 15 |
end
|