Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using Module.new {
- refine(Integer) do
- def >(f)
- f.call __method__
- end
- def <(f)
- f.call __method__
- end
- def +(f)
- f.call __method__
- end
- def -(f)
- f.call __method__
- end
- def &(f)
- f.call __method__
- end
- def |(f)
- f.call __method__
- end
- def `(f)
- f.call __method__
- end
- def ^(f)
- f.call __method__
- end
- def !@(f)
- f.call __method__
- end
- def ~@(f)
- f.call __method__
- end
- def +@(f)
- f.call __method__
- end
- def -@(f)
- f.call __method__
- end
- def =~(f)
- f.call __method__
- end
- def !~(f)
- f.call __method__
- end
- def >>(f)
- f.call __method__
- end
- def <<(f)
- f.call __method__
- end
- def [](f)
- f.call __method__
- end
- def []=(f)
- f.call __method__
- end
- def >=(f)
- f.call __method__
- end
- def <=(f)
- f.call __method__
- end
- def <=>(f)
- f.call __method__
- end
- end
- }
- 42 |>> -> { p @1 }
- 42 |>< -> { p @1 }
- 42 |>+ -> { p @1 }
- 42 |>- -> { p @1 }
- 42 |>& -> { p @1 }
- 42 |>| -> { p @1 }
- 42 |>` -> { p @1 }
- 42 |>^ -> { p @1 }
- 42 |>! -> { p @1 }
- 42 |>~ -> { p @1 }
- 42 |>+@ -> { p @1 }
- 42 |>-@ -> { p @1 }
- 42 |>=~ -> { p @1 }
- 42 |>!~ -> { p @1 }
- 42 |>>> -> { p @1 }
- 42 |><< -> { p @1 }
- 42 |>[] -> { p @1 }
- 42 |>[]= -> { p @1 }
- 42 |>>= -> { p @1 }
- 42 |><= -> { p @1 }
- 42 |><=> -> { p @1 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement