Skip to content

Instantly share code, notes, and snippets.

@hyoshida
Created July 3, 2014 02:20
Show Gist options
  • Save hyoshida/d4a756ed75a4c97151ed to your computer and use it in GitHub Desktop.
Save hyoshida/d4a756ed75a4c97151ed to your computer and use it in GitHub Desktop.
# 特異クラスを取得
def eigenclass
class << self; self; end
end
@hyoshida
Copy link
Author

hyoshida commented Aug 8, 2014

Ruby 1.9.2 からは singleton_class で同様の処理が可能

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment