Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news.babsi.de!open-news-network.org!news2.open-news-network.org!.POSTED!drusus.uplawski.eu!not-for-mail From: Michael Uplawski Newsgroups: comp.lang.ruby Subject: Re: Convert MatchData to Integer Date: Tue, 3 Jun 2014 19:51:03 +0200 Organization: news.babsi.de for open-news-network.org Lines: 31 Message-ID: References: <6d4b5bb3-7b43-4222-8924-504b04f1bd6c@googlegroups.com> NNTP-Posting-Host: 0.221.72.37.dynamic.sat.abo.nordnet.fr X-Trace: news2.open-news-network.org 1401817885 28698 37.72.221.0 (3 Jun 2014 17:51:25 GMT) X-Complaints-To: abuse@open-news-network.org NNTP-Posting-Date: Tue, 3 Jun 2014 17:51:25 +0000 (UTC) User-Agent: slrn/pre1.0.2-14 (Linux) Xref: csiph.com comp.lang.ruby:6988 Good evening On Tue, 3 Jun 2014 03:22:25 -0700 (PDT), qoexcel@gmail.com wrote: > I have also problem, i try to add this value to array element : Where in your code did you initialize 'files_load_DOM' to an Array-object or other container-type with a '[]' method and add a first element to it? > convert_loadDOM = self.loadDOMstat > n1 = convert_loadDOM[/Loading DOM finished: (\d+) ms/, 1] > files_load_DOM[i]= files_load_DOM[i] + Integer(n1) ~~~~~~~~~~~~~~~~~ Not here! > > and i have error: > undefined method `+' for nil:NilClass (NoMethodError) At least, that is, what the message points at. Cherio, Michael -- GnuPG/OpenPGP 4096R/3216CF02 2013-11-15 [expires: 2015-11-15] sub 4096R/2751C550 2013-11-15 [expires: 2015-11-15]