Ruby's output


#1



Why does ruby print some unnecessary output in the end of program? For example it prints nil or the value of last used variable.


def welcome
    puts "Welcome to Ruby!"
end

welcome


#2

@arturgudiev,
Use a google search
== discussions / opinions ==
ruby why nil after using puts site:stackoverflow.com
for instance
http://stackoverflow.com/questions/14741329/why-are-all-my-puts-returning-nil


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.