Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
RubyToshio Maki id:Kirika /   Kirika_K2
•          (@Kirika_K2)•      id:Kirika / http://github.com/kirikak2/•   SIer                           Ruby•   Regional R...
Ruby••        Titanium Mobile       jpmobile• Ruby Silver/Gold       Ruby
m(_ _)m
require ‘singleton’class SingletonClass  include Singletonend>> SingletonClass.newNoMethodError: private method `new calle...
RubygemsActiveRecord::Singleton
Time   DateTime
Time  • Time          Unix TimeTime.now + 30 * 365 * 24 * 3600 # 30RangeError: time + 946080000.000000 out of Time range  ...
DateTime  •    DateTime               Rational            Time  •               Rational       1                 1        ...
kconv UTF-8                         EUC        UTF-8    •     JIS                                 (Ruby 1.8.7            )...
Ruby
2011.12. 24
明日から使える(?)Rubyトリビア
明日から使える(?)Rubyトリビア
明日から使える(?)Rubyトリビア
明日から使える(?)Rubyトリビア
明日から使える(?)Rubyトリビア
明日から使える(?)Rubyトリビア
明日から使える(?)Rubyトリビア
明日から使える(?)Rubyトリビア
明日から使える(?)Rubyトリビア
Upcoming SlideShare
Loading in …5
×

明日から使える(?)Rubyトリビア

2,476 views

Published on

for Lightning Talks in TokyuRubyKaigi04

Published in: Technology, Education
  • Be the first to comment

明日から使える(?)Rubyトリビア

  1. 1. RubyToshio Maki id:Kirika / Kirika_K2
  2. 2. • (@Kirika_K2)• id:Kirika / http://github.com/kirikak2/• SIer Ruby• Regional RubyKaigi
  3. 3. Ruby•• Titanium Mobile jpmobile• Ruby Silver/Gold Ruby
  4. 4. m(_ _)m
  5. 5. require ‘singleton’class SingletonClass include Singletonend>> SingletonClass.newNoMethodError: private method `new called for SingletonClass:Class>>SingletonClass.instance=> #<SingletonClass:0x1005f7a98>
  6. 6. RubygemsActiveRecord::Singleton
  7. 7. Time DateTime
  8. 8. Time • Time Unix TimeTime.now + 30 * 365 * 24 * 3600 # 30RangeError: time + 946080000.000000 out of Time range Ubuntu Linux(32bit) NG MacOS 10(64bit) OK WindowsTime.now + 30 * 365 * 24 * 3600=> Mon Oct 21 11:34:29 +0900 2041
  9. 9. DateTime • DateTime Rational Time • Rational 1 1 1 Rational(1,24) OKrequire ‘date’>> (DateTime.now - 365 * 12000).to_s # 1 2000=> "-9980-01-02T11:46:35+09:00"
  10. 10. kconv UTF-8 EUC UTF-8 • JIS (Ruby 1.8.7 ) • https://gist.github.com/1273188require ‘kconv’kanji5020_503F = <<KANJIKANJIp kanji5020_503Fp kanji5020_503F.toeuc.toutf8" n n""С Т У Ф Х Ц Ч Ш Щ Ъ Ы Ь Э Ю Яnа б в г д е ж з и й к л м н о пn"
  11. 11. Ruby
  12. 12. 2011.12. 24

×