Sep 22, 2015 Ruby ã®å®æ°ã¯ãã¥ã¼ã¿ãã«ã®ãããç®ç«ããªããã°ãåãè¾¼ãå¯è½æ§ãããã Object#freeze ã使ãã¨ãªãã¸ã§ã¯ããã¤ãã¥ã¼ã¿ãã«ï¼ç¶æ å¤æ´ä¸å¯ï¼ã«ã§ããã Ruby ã®å®æ°Ruby 以å¤ã®è¨èªã§ã¯åä»£å ¥ãããªãå ´åãããããRuby ã®å®æ°ã¯ Warning ãåºãã¤ã¤ãåä»£å ¥ã§ããã irb(main):001:0> CONST = "constant string" => "constant string" irb(main):002:0> CONST = "overwrite!" (irb):2: warning: already initialized constant CONST (irb):1: warning: previous definition of CONST was here => "overwrite!"
{{#tags}}- {{label}}
{{/tags}}