ãããã¡ã¤ã©å¥½ããªã¢ãã¿ã®åã®çããããã«ã¡ã¯ã@sonots ã§ãããã®è¨äºã§ã¯ãRuby ã³ã¼ãã®ã©ã®è¡ãã©ã®ãããã¡ã¢ãªãæ¶è²»ãã¦ããã調ã¹ãæ¹æ³ãç´¹ä»ãã¾ãã ãªãã¸ã§ã¯ãã®æ°ãæ°ãã Ruby ã«ã¯ ObjectSpace ã¨ãããªãã¸ã§ã¯ãã®æ å ±ãéãããæä½ããããã module ãããã¾ãã ãã®ã¢ã¸ã¥ã¼ã«ã® each_object ã¡ã½ããã使ç¨ããã¨ãRubyVM ä¸ã®å ¨ã¦ã®ãªãã¸ã§ã¯ããåãåºããã¨ãã§ãã¾ãã ãã®ã¡ã½ããã使ã£ã¦ã以ä¸ã®ãããªã³ã¼ããæ¸ãã¨ãå®è¡ããå°ç¹ã§ãRubyVM ä¸ã«ã©ã®ã¯ã©ã¹ã®ãªãã¸ã§ã¯ããä½ååå¨ãã¦ããã®ãã«ã¦ã³ãã§ãããããããã§ããèå³æ·±ãã§ãã! ObjectSpace.each_object.inject(Hash.new 0) {|h,o| h[o.class]+=1; h } #=> {Class=>241, Strin
{{#tags}}- {{label}}
{{/tags}}