【Perl,PHP】LLバトルロワイヤル2【Ruby,Python】at TECH
【Perl,PHP】LLバトルロワイヤル2【Ruby,Python】 - 暇つぶし2ch204:デフォルトの名無しさん
08/05/04 23:24:56
>>200
今までは否定派だったが、これを知って考えが変わった。
こういうことが余計な苦労無くできるなんて、ほんとうに素晴らしい言語だと思う。

class Test
 def show_yourself()
  puts "ノンケ"
 end
 def func(value)
  if value % 2 == 0
    def show_yourself()
     puts "ウホッ"
    end
  else
   def show_yourself()
    puts "オネエさま~"
   end
  end
 end
end

obj = Test.new
obj.show_yourself()
5.times do
 obj.func(rand(100))
 obj.show_yourself()
end


次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch