# Ruby

**URL:** https://www.ruby-forum.com/c/ruby/7.md?page=1324

[Latest](https://www.ruby-forum.com/latest.md) · [Categories](https://www.ruby-forum.com/categories.md) · [Tags](https://www.ruby-forum.com/tags.md)

**Page:** 1325

---

## [Does Image URL exist?](https://www.ruby-forum.com/t/does-image-url-exist/117317)

<div class="topic-metadata">

**Author:** [@superfly](https://www.ruby-forum.com/u/superfly)\
**Replies:** 2\
**Last updated:** [October 16, 2007, 12:23am UTC](https://www.ruby-forum.com/t/does-image-url-exist/117317 "2007-10-16T00:23:23Z")

</div>

Hello everyone, I’ve been trying to find a code that will let me see if an image URL that I enter exists, but am having trouble. Basically I just need something that will tell me yes or no if the image URL exists or …

---

## [Fwd: Please Forward: Ruby Quiz Submission](https://www.ruby-forum.com/t/fwd-please-forward-ruby-quiz-submission/229113)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 0\
**Last updated:** [October 15, 2007, 11:55pm UTC](https://www.ruby-forum.com/t/fwd-please-forward-ruby-quiz-submission/229113 "2007-10-15T23:55:24Z")

</div>

Begin forwarded message:

---

## [Re: Reverse the Polarity (#143)](https://www.ruby-forum.com/t/re-reverse-the-polarity-143/117321)

<div class="topic-metadata">

**Author:** [@jameskelly](https://www.ruby-forum.com/u/jameskelly)\
**Replies:** 0\
**Last updated:** [October 15, 2007, 11:48pm UTC](https://www.ruby-forum.com/t/re-reverse-the-polarity-143/117321 "2007-10-15T23:48:21Z")

</div>

I made a small mistake in my solution. It will not work on regexes such as /a{11,12}/ if the numbers within the range are more than 1 digit. To fix this, every instance of “(\\d)” in my solution should be replaced with…

---

## [Pulling a file with today's date](https://www.ruby-forum.com/t/pulling-a-file-with-todays-date/117310)

<div class="topic-metadata">

**Author:** [@bodikp](https://www.ruby-forum.com/u/bodikp)\
**Replies:** 2\
**Last updated:** [October 15, 2007, 11:41pm UTC](https://www.ruby-forum.com/t/pulling-a-file-with-todays-date/117310 "2007-10-15T23:41:55Z")

</div>

Hi, Can someone please help me to parse a file by its date so that, when I ftp to a site, I only pull those files that are dated with today’s date, nothing else? I’m OK with pulling all files over, looking at them on …

---

## [Simplifying the defined api](https://www.ruby-forum.com/t/simplifying-the-defined-api/117158)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 8\
**Last updated:** [October 15, 2007, 11:05pm UTC](https://www.ruby-forum.com/t/simplifying-the-defined-api/117158 "2007-10-15T23:05:43Z")

</div>

Question: A recent suggestion to ruby was to have all defined? method’s return true or nil. So my question is…does anybody ever use “defined?” for anything besides true/nil? I also wonder if the complex defined? api…

---

## [New Rails plugin 'Liftoff' is available](https://www.ruby-forum.com/t/new-rails-plugin-liftoff-is-available/117315)

<div class="topic-metadata">

**Author:** [@nbits](https://www.ruby-forum.com/u/nbits)\
**Replies:** 0\
**Last updated:** [October 15, 2007, 10:33pm UTC](https://www.ruby-forum.com/t/new-rails-plugin-liftoff-is-available/117315 "2007-10-15T22:33:57Z")

</div>

http://liftoff.rubyforge.org Summary Liftoff is a simple Rails plugin that gets your application off the ground by generating an initial set of model files from a single text file in which you specify only the names …

---

## [Trouble using WIN32OLE for excel](https://www.ruby-forum.com/t/trouble-using-win32ole-for-excel/117288)

<div class="topic-metadata">

**Author:** [@haleythrapp](https://www.ruby-forum.com/u/haleythrapp)\
**Replies:** 1\
**Last updated:** [October 15, 2007, 9:25pm UTC](https://www.ruby-forum.com/t/trouble-using-win32ole-for-excel/117288 "2007-10-15T21:25:26Z")

</div>

I am trying to do some things that seem pretty basic to me using excel. Basically, I have a two column spreadsheet that I would like to make a scatterplot out of. I am able to create a chart, but I run into issues a…

---

## [Parameter in a block is not local?](https://www.ruby-forum.com/t/parameter-in-a-block-is-not-local/117194)

<div class="topic-metadata">

**Author:** [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Replies:** 20\
**Last updated:** [October 15, 2007, 8:48pm UTC](https://www.ruby-forum.com/t/parameter-in-a-block-is-not-local/117194 "2007-10-15T20:48:30Z")

</div>

I thought a iterator with a block is like an nameless function call… so if it is a function call, the parameter is local. but for the following, the output is surprising: a = 1 p a 1.upto(10) {|a| p a} p a E:\>rub…

---

## [Translate to ObjectSpace? (Ruby/Smalltalk)](https://www.ruby-forum.com/t/translate-to-objectspace-ruby-smalltalk/117300)

<div class="topic-metadata">

**Author:** [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Replies:** 0\
**Last updated:** [October 15, 2007, 8:33pm UTC](https://www.ruby-forum.com/t/translate-to-objectspace-ruby-smalltalk/117300 "2007-10-15T20:33:51Z")

</div>

Here’s a cool Smalltalk code snippet: (Smalltalk allClasses select:\[:each | each category beginsWith: ‘Todo-’\]) inject: 0 into: \[:sum :each | sum + each linesOfCode\] It comes from a blog: http://blog.teksol.info/200…

---

## ["$B$"$$$&(B"\[/.\].encoding #=\> ASCII-8BIT $B$H(B /hoge/.to\_s.encoding](https://www.ruby-forum.com/t/b-b-encoding-ascii-8bit-b-h-b-hoge-to-s-encoding/117295)

<div class="topic-metadata">

**Author:** [@NARUSES\_Yui](https://www.ruby-forum.com/u/NARUSES_Yui)\
**Replies:** 0\
**Last updated:** [October 15, 2007, 7:35pm UTC](https://www.ruby-forum.com/t/b-b-encoding-ascii-8bit-b-h-b-hoge-to-s-encoding/117295 "2007-10-15T19:35:52Z")

</div>

e$B@.@%$G$9!#e(B -- coding: UTF-8 -- str = “e$B$”$$$&$($\*e(B" m = str\[/./\] p m.encoding #=\> Encoding:ASCII-8BIT e$B$H$J$k$N$G$9$,!"$3$3$Oe(B UTF-8 e$BJ8;zNs$rJV$9$Y$-$G$O$J$$$G$7$g$&$+!#$?$V$se(B e$BC1$Ke(B rb\_str\_…

---

## [Nested blocks?](https://www.ruby-forum.com/t/nested-blocks/117214)

<div class="topic-metadata">

**Author:** [@randy\_k](https://www.ruby-forum.com/u/randy_k)\
**Replies:** 8\
**Last updated:** [October 15, 2007, 6:59pm UTC](https://www.ruby-forum.com/t/nested-blocks/117214 "2007-10-15T18:59:11Z")

</div>

The following works fine but I had some thoughts about trying to convert it to two nested blocks (because of the extra goodness of blocks). Can anybody tell me how to do that? I’ve been looking at the relevant pages …

---

## [Volunteers to fix Rake for non-Windows systems?](https://www.ruby-forum.com/t/volunteers-to-fix-rake-for-non-windows-systems/117081)

<div class="topic-metadata">

**Author:** [@John\_LSSDLR](https://www.ruby-forum.com/u/John_LSSDLR)\
**Replies:** 15\
**Last updated:** [October 15, 2007, 6:47pm UTC](https://www.ruby-forum.com/t/volunteers-to-fix-rake-for-non-windows-systems/117081 "2007-10-15T18:47:47Z")

</div>

Overheard last night on IRC: IronRuby SVN has a build system implemented in rake, which is wholly broken on non-Windows systems. Can someone who uses a non-Windows system volunteer to fix the Rakefile? Thanks, -Jo…

---

## [Match operator](https://www.ruby-forum.com/t/match-operator/117185)

<div class="topic-metadata">

**Author:** [@Sanghyeon\_S](https://www.ruby-forum.com/u/Sanghyeon_S)\
**Replies:** 8\
**Last updated:** [October 15, 2007, 6:26pm UTC](https://www.ruby-forum.com/t/match-operator/117185 "2007-10-15T18:26:42Z")

</div>

It seems that match operators (=~ and !~) aren’t currently implemented. e.g. ‘’ =~ // crashes while parsing. Where should one look to implement this?

---

## [Is there a standard pattern for threaded access to a file?](https://www.ruby-forum.com/t/is-there-a-standard-pattern-for-threaded-access-to-a-file/117105)

<div class="topic-metadata">

**Author:** [@jbhruby](https://www.ruby-forum.com/u/jbhruby)\
**Replies:** 36\
**Last updated:** [October 15, 2007, 6:16pm UTC](https://www.ruby-forum.com/t/is-there-a-standard-pattern-for-threaded-access-to-a-file/117105 "2007-10-15T18:16:28Z")

</div>

I’m pretty new to ruby and this is one of those areas where I can’t quite seem to turn my head inside out as the language requires :slight\_smile: I have a log file that I want to process in parts, with multiple threads …

---

## [Needed to change org.jruby.ext.POSIXFunctionMapper.java to pass unit tests and use gem](https://www.ruby-forum.com/t/needed-to-change-org-jruby-ext-posixfunctionmapper-java-to-pass-unit-tests-and-use-gem/117277)

<div class="topic-metadata">

**Author:** [@WolffS\_Tobias](https://www.ruby-forum.com/u/WolffS_Tobias)\
**Replies:** 4\
**Last updated:** [October 15, 2007, 5:43pm UTC](https://www.ruby-forum.com/t/needed-to-change-org-jruby-ext-posixfunctionmapper-java-to-pass-unit-tests-and-use-gem/117277 "2007-10-15T17:43:20Z")

</div>

Hi, my msvcrt.dll does not contain a symbol “chmod”, but rather “\_chmod”. I had to adjust the POSIXFunctionMapper class in the following way: public String getFunctionName(NativeLibrary library, Method method) { Str…

---

## [Using String#slice with a symbol argument](https://www.ruby-forum.com/t/using-string-slice-with-a-symbol-argument/117286)

<div class="topic-metadata">

**Author:** [@mdemare](https://www.ruby-forum.com/u/mdemare)\
**Replies:** 0\
**Last updated:** [October 15, 2007, 5:41pm UTC](https://www.ruby-forum.com/t/using-string-slice-with-a-symbol-argument/117286 "2007-10-15T17:41:00Z")

</div>

Currently, ruby 1.8.6. has the following behavior: ‘ruby’\[:en\] #=\> nil The reason is that the symbol is converted to an integer using to\_int. But this is never useful, and can be a source of obscure bugs when your va…

---

## [Securerandom.rb for 1.8](https://www.ruby-forum.com/t/securerandom-rb-for-1-8/116173)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 17\
**Last updated:** [October 15, 2007, 4:17pm UTC](https://www.ruby-forum.com/t/securerandom-rb-for-1-8/116173 "2007-10-15T16:17:08Z")

</div>

securerandom.rb e$B$re(B 1.8 e$B$KDI2C$7!“e(Bcgi/session.rb e$B$K;H$o$;$?$$e(B e$B$N$G$9$,!”$I$&$G$7$g$&$+!#e(B cgi/session.rb e$B$K8B$j$^$;$s$,!"e(Bsession cookie e$B$N@8@.$K$O0E9fe(B e$B3XE\*$K$=$l$J$j$K0BA4$JMp?t$,…

---

## [Ruby gem, library, class to implement typical functionality of a utility like cp?](https://www.ruby-forum.com/t/ruby-gem-library-class-to-implement-typical-functionality-of-a-utility-like-cp/117216)

<div class="topic-metadata">

**Author:** [@randy\_k](https://www.ruby-forum.com/u/randy_k)\
**Replies:** 4\
**Last updated:** [October 15, 2007, 4:13pm UTC](https://www.ruby-forum.com/t/ruby-gem-library-class-to-implement-typical-functionality-of-a-utility-like-cp/117216 "2007-10-15T16:13:01Z")

</div>

I’m in the process of writing a small utility in Ruby to convert files in one format to a different format. Eventually it would be nice to to have the utility incorporate all or most of the command line functionalit…

---

## [File.rename failing after a few thousand successes . .](https://www.ruby-forum.com/t/file-rename-failing-after-a-few-thousand-successes/117264)

<div class="topic-metadata">

**Author:** [@bodikp](https://www.ruby-forum.com/u/bodikp)\
**Replies:** 4\
**Last updated:** [October 15, 2007, 4:10pm UTC](https://www.ruby-forum.com/t/file-rename-failing-after-a-few-thousand-successes/117264 "2007-10-15T16:10:02Z")

</div>

Hello, With help from this forum, I’ve been successful in parsing through directories of thousands of graphics files. I need to determine which files are postscript EPS files. Any files that aren’t EPS files I can as…

---

## [A couple of issues building in Visual Studio](https://www.ruby-forum.com/t/a-couple-of-issues-building-in-visual-studio/117238)

<div class="topic-metadata">

**Author:** [@Derek\_Knight](https://www.ruby-forum.com/u/Derek_Knight)\
**Replies:** 2\
**Last updated:** [October 15, 2007, 3:50pm UTC](https://www.ruby-forum.com/t/a-couple-of-issues-building-in-visual-studio/117238 "2007-10-15T15:50:10Z")

</div>

I posted this in the open-discussion forum. Maybe that’s not used much these days. I've found a few problems building IronRuby on Windows (using the IronRuby.sln file). It’s possible my set-up might be bad, althoug…

---

## [Bug: Numeric#divmod calculates wrongly](https://www.ruby-forum.com/t/bug-numeric-divmod-calculates-wrongly/116646)

<div class="topic-metadata">

**Author:** [@Dirk\_T](https://www.ruby-forum.com/u/Dirk_T)\
**Replies:** 12\
**Last updated:** [October 15, 2007, 2:44pm UTC](https://www.ruby-forum.com/t/bug-numeric-divmod-calculates-wrongly/116646 "2007-10-15T14:44:33Z")

</div>

Hi all! I submitted the following bug report to http://rubyforge.org/tracker/index.php?func=detail&aid=14540& group\_id=426&atid=1698 =================================================== There is a calculating bug in …

---

## [Rmagick installing problems](https://www.ruby-forum.com/t/rmagick-installing-problems/117263)

<div class="topic-metadata">

**Author:** [@gibbs](https://www.ruby-forum.com/u/gibbs)\
**Replies:** 2\
**Last updated:** [October 15, 2007, 2:33pm UTC](https://www.ruby-forum.com/t/rmagick-installing-problems/117263 "2007-10-15T14:33:25Z")

</div>

I tried to install Rmagick and I have obtained the following error. What can I do? Configuring RMagick 1.15.10 checking for gcc… gcc checking for C compiler default output file name… a.out checking whether the C com…

---

## [About frameset and frame tag in layout](https://www.ruby-forum.com/t/about-frameset-and-frame-tag-in-layout/117254)

<div class="topic-metadata">

**Author:** [@daociyiyou](https://www.ruby-forum.com/u/daociyiyou)\
**Replies:** 0\
**Last updated:** [October 15, 2007, 12:53pm UTC](https://www.ruby-forum.com/t/about-frameset-and-frame-tag-in-layout/117254 "2007-10-15T12:53:36Z")

</div>

Hello: I have used and tags in my store.rhtml which conrresponds to store controller,the code fragment like this : \<html\> \<head\> \<title\> \</title\> \</head\> \<body\> \<frameset\> \<frame src=?\> …

---

## [Re: Using strings to drill down into objects](https://www.ruby-forum.com/t/re-using-strings-to-drill-down-into-objects/117009)

<div class="topic-metadata">

**Author:** [@Ross\_X\_Dawson](https://www.ruby-forum.com/u/Ross_X_Dawson)\
**Replies:** 2\
**Last updated:** [October 15, 2007, 12:12pm UTC](https://www.ruby-forum.com/t/re-using-strings-to-drill-down-into-objects/117009 "2007-10-15T12:12:49Z")

</div>

Sorry folks the example was not correct irb(main):001:0\> drill\_down = lambda do |obj, method\_names| irb(main):002:1\* o ||= obj irb(main):003:1\> method\_names.split(’.’).each {|m| o = o.send(m)} irb(main)…

---

## [\-1073741825.5.round](https://www.ruby-forum.com/t/1073741825-5-round/117236)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [October 15, 2007, 5:47am UTC](https://www.ruby-forum.com/t/1073741825-5-round/117236 "2007-10-15T05:47:27Z")

</div>

e$B0J2\<$N$h$&$K!"e(B-1073741825.5 e$B$r;M\<N8^F~$9$k$He(B 1073741822 e$B$H$:e(B e$B$$$V$s$H0\[$J$C$?CM$K$J$j$^$9!#e(B % ./ruby -ve ‘p(-1073741825.5.round)’ ruby 1.9.0 (2007-10-15 patchlevel 0) \[i686-linux\] 1073741822

---

## [I need some help plz with my ruby project](https://www.ruby-forum.com/t/i-need-some-help-plz-with-my-ruby-project/116974)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 3\
**Last updated:** [October 15, 2007, 5:38am UTC](https://www.ruby-forum.com/t/i-need-some-help-plz-with-my-ruby-project/116974 "2007-10-15T05:38:06Z")

</div>

First, i need to extend the student class, and its to be enumerable by courses. Then, show off the new functionality supported by this change by writing an expression that returns a list of all of the grades a studen…

---

## [Irb, to learn more](https://www.ruby-forum.com/t/irb-to-learn-more/117219)

<div class="topic-metadata">

**Author:** [@john\_old](https://www.ruby-forum.com/u/john_old)\
**Replies:** 6\
**Last updated:** [October 15, 2007, 5:26am UTC](https://www.ruby-forum.com/t/irb-to-learn-more/117219 "2007-10-15T05:26:24Z")

</div>

Here’s an interesting thing you can do in irb: irb You can run an instance of irb within irb. How very Ruby!? In irb you can also do this: methods (or my preferred approach…) methods.sort irb itself has some inter…

---

## [Build broken?](https://www.ruby-forum.com/t/build-broken/117231)

<div class="topic-metadata">

**Author:** [@bantic](https://www.ruby-forum.com/u/bantic)\
**Replies:** 1\
**Last updated:** [October 15, 2007, 3:48am UTC](https://www.ruby-forum.com/t/build-broken/117231 "2007-10-15T03:48:11Z")

</div>

Just got the latest updates, and when I try to run Ruby.Console, it goes Initializer.cs, and then calls LoadModules() which throws a NotImplementedException. – Cory F. Premier Field Engineer - .NET/Dev US East Prem…

---

## [SEGV by Marshal.load("\\004\\bu:\\006C\\004\\377\\377\\377\\177a")](https://www.ruby-forum.com/t/segv-by-marshal-load-004-bu-006c-004-377-377-377-177a/117229)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [October 15, 2007, 3:44am UTC](https://www.ruby-forum.com/t/segv-by-marshal-load-004-bu-006c-004-377-377-377-177a/117229 "2007-10-15T03:44:40Z")

</div>

e$B0J2\<$N$h$&$K$9$k$He(B SEGV e$B$7$^$9!#e(B % ./ruby -ve ’ class C def initialize(str) @str = str end def \_dump(limit) @str end def C.\_load(s) C.new(s) end end p Marshal.load("\\004\\bu:\\006C\\004\\377\\377\\377\\…

---

## [How to pack an integer array to string?](https://www.ruby-forum.com/t/how-to-pack-an-integer-array-to-string/116966)

<div class="topic-metadata">

**Author:** [@goal1860](https://www.ruby-forum.com/u/goal1860)\
**Replies:** 5\
**Last updated:** [October 15, 2007, 3:01am UTC](https://www.ruby-forum.com/t/how-to-pack-an-integer-array-to-string/116966 "2007-10-15T03:01:58Z")

</div>

I want to pack an array such as \[1,2,3,4\] to “1234”, instead of \\001\\002\\003\\004, how to do that?

[Previous page](https://www.ruby-forum.com/c/ruby/7.md?page=1323)

[Next page](https://www.ruby-forum.com/c/ruby/7.md?page=1325)
