#!/usr/bin/env ruby #-*- coding:utf-8 -*- def hello2(namae) printf("%sさん、こんにちは",namae) end # hello2メソッド print"名前を入力してください:" namae = gets.chomp hello2(namae) # 対応する引数も書く