#!/usr/bin/env ruby # -*- coding: utf-8 -*- def hello2(x) print("%sさん、こんにちは") end print"名前を入力してね:" name = gets.chomp hello2(name)