Ruby Online Compiler & Playground
HTML/CSS/JavaScript
HTML
CSS
Javascript
C++
C
PHP
Java
Python
Swift
C#
Ruby
Node.JS
Kotlin
jQuery
Go
R
TypeScript
Start Ruby Course
Register
1+1=0 (Overriding Default Operators)
+1099
Author: Sololearn
Dark
Public
Save
RB
rb
1
2
3
4
5
6
7
8
class
Fixnum
def
+
(
arg
)
return
self
- arg
end
end
puts
1
+
1
Enter to Rename, Shift+Enter to Preview
OUTPUT