This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12:42 :: guinsly:: I'm trying to retrieve a content from another class. But it outputs nil :: https://gist.github.com/guinslym/06bb6bc108c9331e1ff0 | |
12:42 :: jhass:: guinsly: is that your real code? or an example that reproduces? because class foo is invalid | |
12:43 :: shevy:: arup_r, http://stackoverflow.com/questions/543774/undef-why-would-you-want-to-undefine-a-method-in-ruby - but it seems as if people rarely need it | |
12:43 :: jhass:: also note that the @firstname outside a def is a different @firstname | |
12:43 :: jhass:: guinsly: ^ | |
12:43 :: shevy:: I never needed undef, I did need undef_method (or actually... remove_method it was...) | |
12:43 :: guinsly:: jhass, this the realcode except class foo is name LoadFile | |
12:43 :: jhass:: why did you change it? | |
12:44 :: jhass:: but your issue is probably what I just said | |
12:44 :: apeiros:: weird indent. tabs mixed with spaces? o0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# This is a Vagrant configuration file. It can be used to set up and manage | |
# virtual machines on your local system or in the cloud. See http://downloads.vagrantup.com/ | |
# for downloads and installation instructions, and see http://docs.vagrantup.com/v2/ | |
# for more information and configuring and using Vagrant. | |
Vagrant.configure("2") do |config| | |
# Omnibus for chef install | |
config.omnibus.chef_version = :latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'benchmark' | |
n = 100_000_000 | |
Benchmark.bm do |x| | |
x.report do | |
result = [] | |
row = nil | |
n.times do |i| | |
row = i * 5 | |
result << row |
OlderNewer