11. ãªãã¸ã§ã¯ãæå ⢠ãã¹ã¦ããªãã¸ã§ã¯ã(Javaã®ããªããã£ãå ã®ãããªãã®ã¯åå¨ããªã) ⢠ãã¨ãã°ãã¯ã©ã¹ã¯ Class ã¯ã©ã¹ã®ã¤ã³ã¹ã¿ã³ã¹ > 'hi'.class => String > 'hi'.class.class => Class 12. ããã㯠⢠ã¤ãã¬ã¼ã¿ã¨ã㦠⢠ããåºããå¶å¾¡æ§é ã®æ½è±¡åã¨ã㦠['toyama', 'ishikawa', 'fukui'].each {|ken| p ken } def open(path) file = new(path) yield(file) file.close end open(path) {|file| file.write('hi') }
{{#tags}}- {{label}}
{{/tags}}