タグ

classとRubyに関するtyosuke2011のブックマーク (3)

  • Ruby Facets

    rescue from blocks in Ruby 2.5 Did you know that you don't need to use the begin/rescue/end pattern within a Ruby method definition body? If you do, you might have tried like me to apply an inline rescue statement with no begin or end inside of a normal Ruby block, say a block passed to Array#each for example. But... it doesn't work. Although it works fine inside method bodies, this is invalid syn

    Ruby Facets
  • PythonからRubyに移行した人間の印象 - Line 1: Error: Invalid Blog('by Esehara' )


       (2016-06-16)   PythonRubyPythonRuby2.73.5 Python PythonPythonNumpyScipyPython(
    PythonからRubyに移行した人間の印象 - Line 1: Error: Invalid Blog('by Esehara' )
  • 第17章 動的評価


       evalModule#module_evalObject#instance_eval  eval eval eval使  p eval("1 + 1") # 2 eval lvar = 5 @ivar = 6 p eval("lvar + @ivar") # 11  
  • 1