LoginSignup
7
7

More than 5 years have passed since last update.

そう言えばRubyって変数名とかに日本語使えるんだよね

Last updated at Posted at 2013-04-10

FrogApps 技術ブログ始めました!
RailsやiOS、HTML5の情報を発信中!! → http://qiita.com/teams/frogapps


Ruby 1.8ならruby -Ku nihongo.rbで実行。

#!/usr/bin/env ruby
# encoding: utf-8

def 表示()
  puts 
end

class Object
  def です。
    self
  end
  def です
    self
  end
end

class String
  def ()
   self.replace 
  end
end

class C名前 < String
  def self.作成()
    self.new 
  end

  def initialize()
    self.replace 
  end
end

 = C名前.作成('名無し')
表示 

. '増井'.です
表示 
7
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
7