# Ruby

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

[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:** 1640

---

## [Html parsing using regular expressions](https://www.ruby-forum.com/t/html-parsing-using-regular-expressions/73542)

<div class="topic-metadata">

**Author:** [@shinkaku](https://www.ruby-forum.com/u/shinkaku)\
**Replies:** 2\
**Last updated:** [October 25, 2006, 7:21am UTC](https://www.ruby-forum.com/t/html-parsing-using-regular-expressions/73542 "2006-10-25T07:21:49Z")

</div>

I’m new to Ruby and trying to use regular expressions to parse an html file. The page is a large table with no spaces in the html code. I want to count the number of times or \<tr ‘anything’\> occurs. I’m stuck on try…

---

## [Re: DRY fanatics?](https://www.ruby-forum.com/t/re-dry-fanatics/73521)

<div class="topic-metadata">

**Author:** [@Gennady\_B](https://www.ruby-forum.com/u/Gennady_B)\
**Replies:** 3\
**Last updated:** [October 25, 2006, 5:27am UTC](https://www.ruby-forum.com/t/re-dry-fanatics/73521 "2006-10-25T05:27:30Z")

</div>

Rick DeNatale wrote: grp = %{,’(\[^’\]+)’} rx = /^(\[A-Za-z0-9,\]+)#{grp\*3}/ Now, can someone how to make this DRYer? rx = Regexp.new \[’^(\[\\w,\]+)’, \*\["’(.+?)’"\]\*3\].join(’, ') :wink: (assuming ‘\_’ in the first field i…

---

## [Zlib.so Problem on MIPS target platform](https://www.ruby-forum.com/t/zlib-so-problem-on-mips-target-platform/73522)

<div class="topic-metadata">

**Author:** [@craigslist](https://www.ruby-forum.com/u/craigslist)\
**Replies:** 3\
**Last updated:** [October 25, 2006, 4:03am UTC](https://www.ruby-forum.com/t/zlib-so-problem-on-mips-target-platform/73522 "2006-10-25T04:03:40Z")

</div>

Hi You’ll have to forgive me if I miss some obvious details, as I’ve never actually programmed in ruby. I’ve been tasked to install ruby and supporting applications, gems, etc. I’ve built an embedded linux system cro…

---

## [File#flock as a cross-process mutex](https://www.ruby-forum.com/t/file-flock-as-a-cross-process-mutex/73487)

<div class="topic-metadata">

**Author:** [@blackhedd](https://www.ruby-forum.com/u/blackhedd)\
**Replies:** 8\
**Last updated:** [October 25, 2006, 3:55am UTC](https://www.ruby-forum.com/t/file-flock-as-a-cross-process-mutex/73487 "2006-10-25T03:55:39Z")

</div>

Has anyone wrapped up File#flock so it can used as a platform-independent cross-process mutex? (I’m getting tired of writing the same code into every app I do.) Or does anyone have a better idea?

---

## [Fwd: \[OT} DST - was Re: How can my boss take rails seriously](https://www.ruby-forum.com/t/fwd-ot-dst-was-re-how-can-my-boss-take-rails-seriously/73537)

<div class="topic-metadata">

**Author:** [@hopscotch](https://www.ruby-forum.com/u/hopscotch)\
**Replies:** 1\
**Last updated:** [October 25, 2006, 3:51am UTC](https://www.ruby-forum.com/t/fwd-ot-dst-was-re-how-can-my-boss-take-rails-seriously/73537 "2006-10-25T03:51:39Z")

</div>

Not sure about the US, but in the UK, the original reason for a BST (British Summer Time) change was so that farm workers had more daylight hours - don’t know why the US calls it Daylight Savings Time though. These d…

---

## [JRuby shines on Sun Microsystems homepage](https://www.ruby-forum.com/t/jruby-shines-on-sun-microsystems-homepage/73507)

<div class="topic-metadata">

**Author:** [@zoat](https://www.ruby-forum.com/u/zoat)\
**Replies:** 1\
**Last updated:** [October 25, 2006, 3:35am UTC](https://www.ruby-forum.com/t/jruby-shines-on-sun-microsystems-homepage/73507 "2006-10-25T03:35:39Z")

</div>

See these two interviews directly from the Sun Microsystems Homepage (http://www.sun.com) with the JRuby team. Learn about JRuby with Thomas E. Hardware | Oracle Learn about JRuby with Charles Nutter Hardware | Orac…

---

## [DRY fanatics?](https://www.ruby-forum.com/t/dry-fanatics/73156)

<div class="topic-metadata">

**Author:** [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Replies:** 14\
**Last updated:** [October 25, 2006, 1:03am UTC](https://www.ruby-forum.com/t/dry-fanatics/73156 "2006-10-25T01:03:23Z")

</div>

Anybody know a way to make this DRYer? when /^(\[A-Za-z0-9,\]+), '(\[^'\]+)', '(\[^'\]+)', '(\[^'\]+)'/ a literal regex with a subpattern repeated three times I could probably split on the ', but it seems that might have unwa…

---

## [Modules and foo](https://www.ruby-forum.com/t/modules-and-foo/73357)

<div class="topic-metadata">

**Author:** [@cuspendlove](https://www.ruby-forum.com/u/cuspendlove)\
**Replies:** 2\
**Last updated:** [October 24, 2006, 11:37pm UTC](https://www.ruby-forum.com/t/modules-and-foo/73357 "2006-10-24T23:37:14Z")

</div>

I have some questions about some things that i don’t understand… here is some code fragments I have two questions. One… is there a better way to inherit between modules that i don’t know about? Two… why, when a meth…

---

## [File::open and File.open](https://www.ruby-forum.com/t/file-open-and-file-open/73336)

<div class="topic-metadata">

**Author:** [@brad7a0](https://www.ruby-forum.com/u/brad7a0)\
**Replies:** 5\
**Last updated:** [October 24, 2006, 11:35pm UTC](https://www.ruby-forum.com/t/file-open-and-file-open/73336 "2006-10-24T23:35:13Z")

</div>

What exactly is the difference between these? :: is a class method while . is an instance method??? If that is so, could someone clarify this with more detail? I use File.open, but File::open works too. However someti…

---

## [Unsubscribe](https://www.ruby-forum.com/t/unsubscribe/73497)

<div class="topic-metadata">

**Author:** [@Res\_P](https://www.ruby-forum.com/u/Res_P)\
**Replies:** 0\
**Last updated:** [October 24, 2006, 10:40pm UTC](https://www.ruby-forum.com/t/unsubscribe/73497 "2006-10-24T22:40:53Z")

</div>

\----Original Message Follows---- From: removed\_email\_address@domain.invalid Reply-To: removed\_email\_address@domain.invalid To: removed\_email\_address@domain.invalid Subject: Welcome to our (ruby-talk ML) You a…

---

## [OT: Does anyone have an extra shirt from rubyconf?](https://www.ruby-forum.com/t/ot-does-anyone-have-an-extra-shirt-from-rubyconf/73305)

<div class="topic-metadata">

**Author:** [@Nathan\_Peel](https://www.ruby-forum.com/u/Nathan_Peel)\
**Replies:** 3\
**Last updated:** [October 24, 2006, 10:16pm UTC](https://www.ruby-forum.com/t/ot-does-anyone-have-an-extra-shirt-from-rubyconf/73305 "2006-10-24T22:16:01Z")

</div>

I don’t know if there were any extras but if there were I’d gladly pay to have it shipped to me. I’d prefer an XL but a large or XXL would work. Somehow I managed to lose my tshirt between my hotel room and the airpo…

---

## [Re: How to convert long/milliseconds to DateTime?](https://www.ruby-forum.com/t/re-how-to-convert-long-milliseconds-to-datetime/73490)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 0\
**Last updated:** [October 24, 2006, 10:05pm UTC](https://www.ruby-forum.com/t/re-how-to-convert-long-milliseconds-to-datetime/73490 "2006-10-24T22:05:58Z")

</div>

From: removed\_email\_address@domain.invalid \[mailto:removed\_email\_address@domain.invalid\] irb(main):003:0\> Time.at(1161275493444 / 1000.0) =\> Thu Oct 19 11:31:33 CDT 2006 That trailing “.0” is important (and I omitte…

---

## [Re: search file in a directory](https://www.ruby-forum.com/t/re-search-file-in-a-directory/73452)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 1\
**Last updated:** [October 24, 2006, 9:59pm UTC](https://www.ruby-forum.com/t/re-search-file-in-a-directory/73452 "2006-10-24T21:59:54Z")

</div>

From: James Edward G. II \[mailto:removed\_email\_address@domain.invalid\] On Oct 22, 2006, at 12:15 PM, Robert K. wrote: Do we have a gateway problem again? We took some pretty drastic measures when we addressed the la…

---

## [Re: How to convert long/milliseconds to DateTime?](https://www.ruby-forum.com/t/re-how-to-convert-long-milliseconds-to-datetime/73483)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 2\
**Last updated:** [October 24, 2006, 9:57pm UTC](https://www.ruby-forum.com/t/re-how-to-convert-long-milliseconds-to-datetime/73483 "2006-10-24T21:57:54Z")

</div>

From: Mike Nospam Java developer making the switch. Welcome! I have timestamps stored in Oracle as a long (gotten from java.sql.Timestamp - milliseconds from some day in 1970). Is there a way to convert that lon…

---

## [Ruby-VPI 8.2.0](https://www.ruby-forum.com/t/ruby-vpi-8-2-0/73486)

<div class="topic-metadata">

**Author:** [@Suraj\_NSKurapati](https://www.ruby-forum.com/u/Suraj_NSKurapati)\
**Replies:** 0\
**Last updated:** [October 24, 2006, 9:31pm UTC](https://www.ruby-forum.com/t/ruby-vpi-8-2-0/73486 "2006-10-24T21:31:44Z")

</div>

\-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Version 8.2.0 (2006-10-24) Ruby-VPI is a Ruby interface to Verilog VPI. It lets you create complex Verilog test benches easily and wholly in Ruby. Website: http://ruby…

---

## [How to convert long/milliseconds to DateTime?](https://www.ruby-forum.com/t/how-to-convert-long-milliseconds-to-datetime/73482)

<div class="topic-metadata">

**Author:** [@miken700](https://www.ruby-forum.com/u/miken700)\
**Replies:** 0\
**Last updated:** [October 24, 2006, 9:16pm UTC](https://www.ruby-forum.com/t/how-to-convert-long-milliseconds-to-datetime/73482 "2006-10-24T21:16:08Z")

</div>

Hi, Java developer making the switch. I have timestamps stored in Oracle as a long (gotten from java.sql.Timestamp - milliseconds from some day in 1970). Is there a way to convert that long back into a Ruby Date/Date…

---

## [Bitstuct and binary files](https://www.ruby-forum.com/t/bitstuct-and-binary-files/73461)

<div class="topic-metadata">

**Author:** [@rob](https://www.ruby-forum.com/u/rob)\
**Replies:** 6\
**Last updated:** [October 24, 2006, 9:01pm UTC](https://www.ruby-forum.com/t/bitstuct-and-binary-files/73461 "2006-10-24T21:01:34Z")

</div>

Hi, I’ve been working with modifying a binary file to replace some meta-data included within. I’ve had some discussions previously (Binary file modification - Ruby - Ruby-Forum) about this but couldn’t get to a sati…

---

## [Re: parsing HTML code with regex](https://www.ruby-forum.com/t/re-parsing-html-code-with-regex/73479)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 0\
**Last updated:** [October 24, 2006, 8:53pm UTC](https://www.ruby-forum.com/t/re-parsing-html-code-with-regex/73479 "2006-10-24T20:53:18Z")

</div>

From: Gavin K. From: Anthony W. Sent: Tuesday, October 24, 2006 12:35 PM I’m trying to count and print each and \<tr ‘something’\>. Do you just want to match the “ ”, or do you want to match the “ …”? Assuming …

---

## [Re: parsing HTML code with regex](https://www.ruby-forum.com/t/re-parsing-html-code-with-regex/73470)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 0\
**Last updated:** [October 24, 2006, 8:49pm UTC](https://www.ruby-forum.com/t/re-parsing-html-code-with-regex/73470 "2006-10-24T20:49:14Z")

</div>

From: Anthony W. Sent: Tuesday, October 24, 2006 12:35 PM I’m trying to count and print each and \<tr ‘something’\>. Do you just want to match the “ ”, or do you want to match the “ …”? Assuming the former: row\_…

---

## [Getting path of current script](https://www.ruby-forum.com/t/getting-path-of-current-script/73462)

<div class="topic-metadata">

**Author:** [@joe](https://www.ruby-forum.com/u/joe)\
**Replies:** 2\
**Last updated:** [October 24, 2006, 8:39pm UTC](https://www.ruby-forum.com/t/getting-path-of-current-script/73462 "2006-10-24T20:39:04Z")

</div>

Is there a simpler way to get the absolute path of the current script? path = File.dirname(File.expand\_path(FILE)) File.dirname(FILE) by itself can return a relative or absolute path. Joe

---

## [Backquote and variables](https://www.ruby-forum.com/t/backquote-and-variables/73464)

<div class="topic-metadata">

**Author:** [@rlorimor](https://www.ruby-forum.com/u/rlorimor)\
**Replies:** 3\
**Last updated:** [October 24, 2006, 8:36pm UTC](https://www.ruby-forum.com/t/backquote-and-variables/73464 "2006-10-24T20:36:59Z")

</div>

I am trying to construct a command line to be executed using backquote \`\` notation. i.e. capturing the output to a string e.g. #!/usr/bin/ruby -w file = “/etc/motd” string = "cat " + file puts string % ruby test…

---

## [Re: Getting path of current script](https://www.ruby-forum.com/t/re-getting-path-of-current-script/73463)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 0\
**Last updated:** [October 24, 2006, 8:11pm UTC](https://www.ruby-forum.com/t/re-getting-path-of-current-script/73463 "2006-10-24T20:11:02Z")

</div>

From: Joe R. MUDCRAP-CE Is there a simpler way to get the absolute path of the current script? path = File.dirname(File.expand\_path(FILE)) Under some circumstances (like, you haven’t changed the working directory, …

---

## [Parsing a command](https://www.ruby-forum.com/t/parsing-a-command/73458)

<div class="topic-metadata">

**Author:** [@Paul\_I](https://www.ruby-forum.com/u/Paul_I)\
**Replies:** 0\
**Last updated:** [October 24, 2006, 7:56pm UTC](https://www.ruby-forum.com/t/parsing-a-command/73458 "2006-10-24T19:56:59Z")

</div>

Hi, My app has (amongst other UIs) a CLI that, as expected, has a small set of commands. The CLI is written in Ruby, as the rest of the app. I want to improve my CLI add command by passing all the parameters to it in…

---

## [Fast portable storage for queues](https://www.ruby-forum.com/t/fast-portable-storage-for-queues/73217)

<div class="topic-metadata">

**Author:** [@snacktime](https://www.ruby-forum.com/u/snacktime)\
**Replies:** 17\
**Last updated:** [October 24, 2006, 7:54pm UTC](https://www.ruby-forum.com/t/fast-portable-storage-for-queues/73217 "2006-10-24T19:54:57Z")

</div>

I’ve tested out a couple of ways of storing a queue structure and wondered if others had some better ideas. I tried a berkeleydb based queue using it’s native queue structure, which gives the best performance so far …

---

## [Northern Virginia Ruby user's group meeting 10/25/06](https://www.ruby-forum.com/t/northern-virginia-ruby-users-group-meeting-10-25-06/73454)

<div class="topic-metadata">

**Author:** [@tbcox23](https://www.ruby-forum.com/u/tbcox23)\
**Replies:** 0\
**Last updated:** [October 24, 2006, 7:26pm UTC](https://www.ruby-forum.com/t/northern-virginia-ruby-users-group-meeting-10-25-06/73454 "2006-10-24T19:26:27Z")

</div>

Hi all - For those in the northern Virginia/DC area, there’s a Ruby user’s group meeting this Wednesday. Navjeet C. will be presenting on Rails plugins and Rob Wayment will be presenting on BackgrounDRb and also on …

---

## [Rails in Miami](https://www.ruby-forum.com/t/rails-in-miami/73451)

<div class="topic-metadata">

**Author:** [@miami](https://www.ruby-forum.com/u/miami)\
**Replies:** 0\
**Last updated:** [October 24, 2006, 7:22pm UTC](https://www.ruby-forum.com/t/rails-in-miami/73451 "2006-10-24T19:22:26Z")

</div>

Does anyone know if there are any Ruby on Rails users groups in Miami, Florida? If not, is there anyone here from the Miami area who would like to start one?

---

## [WaterMark with file\_column](https://www.ruby-forum.com/t/watermark-with-file-column/72958)

<div class="topic-metadata">

**Author:** [@rordirectory](https://www.ruby-forum.com/u/rordirectory)\
**Replies:** 1\
**Last updated:** [October 24, 2006, 7:14pm UTC](https://www.ruby-forum.com/t/watermark-with-file-column/72958 "2006-10-24T19:14:19Z")

</div>

Hi We are trying to put a watermark in our rental portal for the property pictures uploaded by users; how do you do it with file\_column. I searched but could not find anything. thanks R. Mann http://www.BharathRenta…

---

## [Help: Bus Error when 'splitting' a String](https://www.ruby-forum.com/t/help-bus-error-when-splitting-a-string/72733)

<div class="topic-metadata">

**Author:** [@diego\_v](https://www.ruby-forum.com/u/diego_v)\
**Replies:** 4\
**Last updated:** [October 24, 2006, 7:10pm UTC](https://www.ruby-forum.com/t/help-bus-error-when-splitting-a-string/72733 "2006-10-24T19:10:19Z")

</div>

Hello, I’m currently trying to run a little script but I am stuck with this error… which I can’t decipher. The error message says just: \[BUG\] Bus Error and with a few puts statements here and there I could work out i…

---

## [Powerpoint converter?](https://www.ruby-forum.com/t/powerpoint-converter/73386)

<div class="topic-metadata">

**Author:** [@Armando\_P](https://www.ruby-forum.com/u/Armando_P)\
**Replies:** 2\
**Last updated:** [October 24, 2006, 6:56pm UTC](https://www.ruby-forum.com/t/powerpoint-converter/73386 "2006-10-24T18:56:35Z")

</div>

Hi everyone is there a ruby library to create powerpoint files or open office power point files? Thanks. Been looking around for a few weeks now but cant seem to find a thing on google or sourceforce. Thank Armando…

---

## [Ruby-Reports how to use with Rails](https://www.ruby-forum.com/t/ruby-reports-how-to-use-with-rails/73440)

<div class="topic-metadata">

**Author:** [@johnlester](https://www.ruby-forum.com/u/johnlester)\
**Replies:** 1\
**Last updated:** [October 24, 2006, 6:48pm UTC](https://www.ruby-forum.com/t/ruby-reports-how-to-use-with-rails/73440 "2006-10-24T18:48:10Z")

</div>

I am in the process of trying to write some code in ruby that will take a file as input and parse the file. Particularly I would like to be able to extract functions from .c and .cpp files and then run metrics on t…

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

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