Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. using Module.new {
  2. refine(Integer) do
  3. def >(f)
  4. f.call __method__
  5. end
  6.  
  7. def <(f)
  8. f.call __method__
  9. end
  10.  
  11. def +(f)
  12. f.call __method__
  13. end
  14.  
  15. def -(f)
  16. f.call __method__
  17. end
  18.  
  19. def &(f)
  20. f.call __method__
  21. end
  22.  
  23. def |(f)
  24. f.call __method__
  25. end
  26.  
  27. def `(f)
  28. f.call __method__
  29. end
  30.  
  31. def ^(f)
  32. f.call __method__
  33. end
  34.  
  35. def !@(f)
  36. f.call __method__
  37. end
  38.  
  39. def ~@(f)
  40. f.call __method__
  41. end
  42.  
  43. def +@(f)
  44. f.call __method__
  45. end
  46.  
  47. def -@(f)
  48. f.call __method__
  49. end
  50.  
  51. def =~(f)
  52. f.call __method__
  53. end
  54.  
  55. def !~(f)
  56. f.call __method__
  57. end
  58.  
  59. def >>(f)
  60. f.call __method__
  61. end
  62.  
  63. def <<(f)
  64. f.call __method__
  65. end
  66.  
  67. def [](f)
  68. f.call __method__
  69. end
  70.  
  71. def []=(f)
  72. f.call __method__
  73. end
  74.  
  75. def >=(f)
  76. f.call __method__
  77. end
  78.  
  79. def <=(f)
  80. f.call __method__
  81. end
  82.  
  83. def <=>(f)
  84. f.call __method__
  85. end
  86. end
  87. }
  88.  
  89. 42 |>> -> { p @1 }
  90. 42 |>< -> { p @1 }
  91. 42 |>+ -> { p @1 }
  92. 42 |>- -> { p @1 }
  93. 42 |>& -> { p @1 }
  94. 42 |>| -> { p @1 }
  95. 42 |>` -> { p @1 }
  96. 42 |>^ -> { p @1 }
  97. 42 |>! -> { p @1 }
  98. 42 |>~ -> { p @1 }
  99. 42 |>+@ -> { p @1 }
  100. 42 |>-@ -> { p @1 }
  101. 42 |>=~ -> { p @1 }
  102. 42 |>!~ -> { p @1 }
  103. 42 |>>> -> { p @1 }
  104. 42 |><< -> { p @1 }
  105. 42 |>[] -> { p @1 }
  106. 42 |>[]= -> { p @1 }
  107. 42 |>>= -> { p @1 }
  108. 42 |><= -> { p @1 }
  109. 42 |><=> -> { p @1 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement