-
-
Save namncn/2db111e8cc77a5c19024c11413cd44cf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> IRB | |
2.2.0: 001> require './math' | |
=> Đúng | |
2.2.0: 002> multiply_by_two 2 | |
=> 4 | |
2.2.0: 003> multiply_by_two -2 | |
=> -4 | |
2.2.0: 004> multiply_by_two | |
ArgumentError: Xin cung cấp một số hợp lệ | |
from /Users/bill/dev/math.rb:3:in 'multiply_by_two' | |
from (IRB): 4 | |
from /Users/bill/.rvm/rubies/ruby-2.2.0/bin/irb:11:in `<main>' | |
2.2.0: 005> multiply_by_two "ruby" | |
ArgumentError: Xin cung cấp một số hợp lệ | |
from /Users/bill/dev/math.rb:3:in 'multiply_by_two' | |
from (IRB): 5 | |
from /Users/bill/.rvm/rubies/ruby-2.2.0/bin/irb:11:in `<main> ' | |
2.2.0: 006> multiply_by_two nil | |
ArgumentError: Xin cung cấp một số hợp lệ | |
from /Users/bill/dev/math.rb:3:in 'multiply_by_two' | |
from (IRB): 6 | |
from /Users/bill/.rvm/rubies/ruby-2.2.0/bin/irb:11:in `<main> ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment