# Ruby

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

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

---

## [Calling a block with some context](https://www.ruby-forum.com/t/calling-a-block-with-some-context/59379)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [May 3, 2006, 6:59pm UTC](https://www.ruby-forum.com/t/calling-a-block-with-some-context/59379 "2006-05-03T18:59:38Z")

</div>

I would like to be able to call a block / proc / lambda with the current context (as well as the context it was created in): def make\_proc Proc.new {puts from\_calling\_context} end proc = make\_proc from\_calling\_cont…

---

## [New Ruby Mirror, Germany, Europe](https://www.ruby-forum.com/t/new-ruby-mirror-germany-europe/59382)

<div class="topic-metadata">

**Author:** [@Tobias\_Schwarz](https://www.ruby-forum.com/u/Tobias_Schwarz)\
**Replies:** 0\
**Last updated:** [May 3, 2006, 6:59pm UTC](https://www.ruby-forum.com/t/new-ruby-mirror-germany-europe/59382 "2006-05-03T18:59:33Z")

</div>

Dear Ruby-Lang Team, we just setup an new Ruby-Lang Mirror. Some details: Access URL: http://dl.ambiweb.de/mirrors/ftp.ruby-lang.org/ Location: Erfurt, central Germany, Europe Provided by: AmbiWeb GmbH (http://www.am…

---

## [More explicit Ruby code](https://www.ruby-forum.com/t/more-explicit-ruby-code/59203)

<div class="topic-metadata">

**Author:** [@brad](https://www.ruby-forum.com/u/brad)\
**Replies:** 12\
**Last updated:** [May 3, 2006, 6:59pm UTC](https://www.ruby-forum.com/t/more-explicit-ruby-code/59203 "2006-05-03T18:59:32Z")

</div>

I’m not a long time Ruby coder, but I have coded for quite some time. I wanted to ask the groups’ opinion on being more explicit with Ruby code. I like to code like this: Kernel.puts(“Print this string”) instead of t…

---

## ["All-in-one" archives library?](https://www.ruby-forum.com/t/all-in-one-archives-library/59372)

<div class="topic-metadata">

**Author:** [@victor123789](https://www.ruby-forum.com/u/victor123789)\
**Replies:** 2\
**Last updated:** [May 3, 2006, 6:59pm UTC](https://www.ruby-forum.com/t/all-in-one-archives-library/59372 "2006-05-03T18:59:23Z")

</div>

Hi all. I’d like to see some library which handles most popular archive types (zip, rar, tar, gz, bz2 …) in uniform way, just like rubyzip\[1\] does: require ‘some-very-cool-library’ Dir\[‘myarchive.zip’\].each … Or ev…

---

## [Re: Net::LDAP 0.0.1](https://www.ruby-forum.com/t/re-net-ldap-0-0-1/94409)

<div class="topic-metadata">

**Author:** [@PeSSSSaS\_Botp](https://www.ruby-forum.com/u/PeSSSSaS_Botp)\
**Replies:** 1\
**Last updated:** [May 3, 2006, 6:59pm UTC](https://www.ruby-forum.com/t/re-net-ldap-0-0-1/94409 "2006-05-03T18:59:17Z")

</div>

Francis C. \[mailto:removed\_email\_address@domain.invalid\] : I’m especially interested in any problems people may have with Active Directory. This was tested heavily against Unix servers. We know about the 1000-entry …

---

## [Net::LDAP 0.0.1](https://www.ruby-forum.com/t/net-ldap-0-0-1/59363)

<div class="topic-metadata">

**Author:** [@blackhedd](https://www.ruby-forum.com/u/blackhedd)\
**Replies:** 6\
**Last updated:** [May 3, 2006, 6:59pm UTC](https://www.ruby-forum.com/t/net-ldap-0-0-1/59363 "2006-05-03T18:59:14Z")

</div>

We’re pleased to announce the first release of Net::LDAP, the first pure-Ruby LDAP library. Net::LDAP intends to be a feature-complete LDAP client which can access as much as possible of the functionality of the most-…

---

## [Find the 3 newest rows in the database](https://www.ruby-forum.com/t/find-the-3-newest-rows-in-the-database/59234)

<div class="topic-metadata">

**Author:** [@david](https://www.ruby-forum.com/u/david)\
**Replies:** 5\
**Last updated:** [May 3, 2006, 6:59pm UTC](https://www.ruby-forum.com/t/find-the-3-newest-rows-in-the-database/59234 "2006-05-03T18:59:13Z")

</div>

Hi, I have an Adverts table with a created\_at column. I would like to get back the 3 newest adverts. How would I do this. Thanks David

---

## [Just need a clue](https://www.ruby-forum.com/t/just-need-a-clue/94363)

<div class="topic-metadata">

**Author:** [@alan](https://www.ruby-forum.com/u/alan)\
**Replies:** 2\
**Last updated:** [May 3, 2006, 6:59pm UTC](https://www.ruby-forum.com/t/just-need-a-clue/94363 "2006-05-03T18:59:10Z")

</div>

Hi, I want to replace some DOS batch scripts with Ruby scripts. Could you give me a clue how can I execute a .EXE file within Ruby script and also how can I check the errorlevel? Any help would be appreciated, Alan

---

## [Getting the name of arguments a method takes](https://www.ruby-forum.com/t/getting-the-name-of-arguments-a-method-takes/61960)

<div class="topic-metadata">

**Author:** [@didier-prophete](https://www.ruby-forum.com/u/didier-prophete)\
**Replies:** 3\
**Last updated:** [May 3, 2006, 6:59pm UTC](https://www.ruby-forum.com/t/getting-the-name-of-arguments-a-method-takes/61960 "2006-05-03T18:59:04Z")

</div>

I am wondering if there is a way to programatically get the name of the arguments a function take. Say, I have this code: class MyClass def my\_fct(a, b, c) end end Now, I can easily get a handle to the method ‘my\_…

---

## [Re: Net::LDAP 0.0.1](https://www.ruby-forum.com/t/re-net-ldap-0-0-1/59368)

<div class="topic-metadata">

**Author:** [@rooster](https://www.ruby-forum.com/u/rooster)\
**Replies:** 2\
**Last updated:** [May 3, 2006, 6:58pm UTC](https://www.ruby-forum.com/t/re-net-ldap-0-0-1/59368 "2006-05-03T18:58:57Z")

</div>

Greetings, What is the difference between this LDAP package and the one currently maintained by Ian Macdonald: http://raa.ruby-lang.org/project/ruby-ldap/ More specifically, is there an obvious reason to use your ld…

---

## [Possible Bug in mysql-ruby 2.7](https://www.ruby-forum.com/t/possible-bug-in-mysql-ruby-2-7/59319)

<div class="topic-metadata">

**Author:** [@zdennis](https://www.ruby-forum.com/u/zdennis)\
**Replies:** 2\
**Last updated:** [May 3, 2006, 6:58pm UTC](https://www.ruby-forum.com/t/possible-bug-in-mysql-ruby-2-7/59319 "2006-05-03T18:58:49Z")

</div>

\-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I am trying to store very small gzipped files in my mysql database. The storage works great, but when I retreive the data some fields are interpolated. Examples: \\010 …

---

## [What's "new" in drb?](https://www.ruby-forum.com/t/whats-new-in-drb/59316)

<div class="topic-metadata">

**Author:** [@Hal\_F](https://www.ruby-forum.com/u/Hal_F)\
**Replies:** 1\
**Last updated:** [May 3, 2006, 6:58pm UTC](https://www.ruby-forum.com/t/whats-new-in-drb/59316 "2006-05-03T18:58:20Z")

</div>

What’s “new” in distributed Ruby? And by “new” I mean less than five years old. :wink: Hal

---

## [Traversal of a tree + block code](https://www.ruby-forum.com/t/traversal-of-a-tree-block-code/59213)

<div class="topic-metadata">

**Author:** [@esquilax](https://www.ruby-forum.com/u/esquilax)\
**Replies:** 4\
**Last updated:** [May 3, 2006, 6:58pm UTC](https://www.ruby-forum.com/t/traversal-of-a-tree-block-code/59213 "2006-05-03T18:58:17Z")

</div>

Hi: I want to be able to traverse a tree and for each node perform some random code…sounds like an ideal situation for blocks, right? :slight\_smile: My problem is that I’m not sure how to keep passing the code block i…

---

## [Publish/Subscribe pattern in DRb](https://www.ruby-forum.com/t/publish-subscribe-pattern-in-drb/59156)

<div class="topic-metadata">

**Author:** [@bujji\_choudhary](https://www.ruby-forum.com/u/bujji_choudhary)\
**Replies:** 1\
**Last updated:** [May 3, 2006, 6:58pm UTC](https://www.ruby-forum.com/t/publish-subscribe-pattern-in-drb/59156 "2006-05-03T18:58:14Z")

</div>

HI all, I have 3 files.In pubsubserver.rb, I wrote the classes(according to RCR198). In Publisher.rb, i have created an object of main class and bound it to the server server=Abc.new() Drb.start\_service(‘druby://:lo…

---

## [Shortcut for .pack("p\*").unpack("l").first?](https://www.ruby-forum.com/t/shortcut-for-pack-p-unpack-l-first/94393)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 3\
**Last updated:** [May 3, 2006, 6:58pm UTC](https://www.ruby-forum.com/t/shortcut-for-pack-p-unpack-l-first/94393 "2006-05-03T18:58:14Z")

</div>

Hi all, If I want to get the underlying pointer address of a Ruby string, I can do this: string = “hello” \[string\].pack(“p\*”).unpack(“l”).first # 43329024 I thought there was a shortcut for this. Originally I thoug…

---

## [Re: Shortcut for .pack("p\*").unpack("l").first?](https://www.ruby-forum.com/t/re-shortcut-for-pack-p-unpack-l-first/94404)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 0\
**Last updated:** [May 3, 2006, 6:58pm UTC](https://www.ruby-forum.com/t/re-shortcut-for-pack-p-unpack-l-first/94404 "2006-05-03T18:58:00Z")

</div>

an extension then there’s probably an easier way to get at the str2 = “hello” Using string addresses strcmp2.call(addr1, addr2) # 0 strcmp2.call(addr1, addr3) # -1 Now you lost me again: if you can use a string …

---

## [Re: Shortcut for .pack("p\*").unpack("l").first?](https://www.ruby-forum.com/t/re-shortcut-for-pack-p-unpack-l-first/94402)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 1\
**Last updated:** [May 3, 2006, 6:57pm UTC](https://www.ruby-forum.com/t/re-shortcut-for-pack-p-unpack-l-first/94402 "2006-05-03T18:57:57Z")

</div>

If I want to get the underlying pointer address of a Ruby string, I can do this: What do you want with a memory address in Ruby-land? If you’re in an extension then there’s probably an easier way to get at the ad…

---

## [How to use curly brackets vs. 'end' in Ruby](https://www.ruby-forum.com/t/how-to-use-curly-brackets-vs-end-in-ruby/59120)

<div class="topic-metadata">

**Author:** [@carlo](https://www.ruby-forum.com/u/carlo)\
**Replies:** 19\
**Last updated:** [May 3, 2006, 6:57pm UTC](https://www.ruby-forum.com/t/how-to-use-curly-brackets-vs-end-in-ruby/59120 "2006-05-03T18:57:57Z")

</div>

i dislike the use of ‘end’ (just about the only think i don’t like in ruby). so, since everybody is saying that this is just a matter of taste, why won’t this work: class Hello { attr\_reader :msg def initialize { …

---

## [Re: BSTR data type](https://www.ruby-forum.com/t/re-bstr-data-type/59345)

<div class="topic-metadata">

**Author:** [@jamal86](https://www.ruby-forum.com/u/jamal86)\
**Replies:** 0\
**Last updated:** [May 3, 2006, 6:57pm UTC](https://www.ruby-forum.com/t/re-bstr-data-type/59345 "2006-05-03T18:57:48Z")

</div>

An example of a DLL that uses the BSTR data type is the free spell checker, PwrSpell, at http://www.zcureit.com/powerbasic/pwrspell.zip The library is compiled with PowerBasic, and the provided include file is also P…

---

## [Ruby-dev summary 28495-28605](https://www.ruby-forum.com/t/ruby-dev-summary-28495-28605/59341)

<div class="topic-metadata">

**Author:** [@Takaaki\_T](https://www.ruby-forum.com/u/Takaaki_T)\
**Replies:** 0\
**Last updated:** [May 3, 2006, 6:57pm UTC](https://www.ruby-forum.com/t/ruby-dev-summary-28495-28605/59341 "2006-05-03T18:57:44Z")

</div>

Here is a summary of the articles posted to ruby-dev. \[ruby-dev:28502\] rb\_gc\_call\_finalizer\_at\_exit() Nagai, who is a maintainer of tcltklib, asked how to know that functions are called by rb\_gc\_call\_finalizer\_at\_exi…

---

## [Re: BSTR data type](https://www.ruby-forum.com/t/re-bstr-data-type/94399)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 0\
**Last updated:** [May 3, 2006, 6:57pm UTC](https://www.ruby-forum.com/t/re-bstr-data-type/94399 "2006-05-03T18:57:44Z")

</div>

(at least directly). Does anyone have code to do so? How about the variant data type? (I am not talking about COM server libraries that could be called with Win32OLE.) BSTR is a wide string, so your declaration w…

---

## [BSTR data type](https://www.ruby-forum.com/t/bstr-data-type/94398)

<div class="topic-metadata">

**Author:** [@jamal86](https://www.ruby-forum.com/u/jamal86)\
**Replies:** 0\
**Last updated:** [May 3, 2006, 6:57pm UTC](https://www.ruby-forum.com/t/bstr-data-type/94398 "2006-05-03T18:57:41Z")

</div>

I have some Windows DLLs that include functions where the BSTR data type is used as a parameter and/or return value. The Win32API library does not seem to support this data type (at least directly). Does anyone have…

---

## [Re: Possible Ruby Bug?](https://www.ruby-forum.com/t/re-possible-ruby-bug/94397)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 0\
**Last updated:** [May 3, 2006, 6:57pm UTC](https://www.ruby-forum.com/t/re-possible-ruby-bug/94397 "2006-05-03T18:57:40Z")

</div>

http://rubyforge.org/pipermail/win32utils-devel/2006-March/000525.html Try CVS version. How do I get the updated .so file? I got the cvs taskscheduler.c, taskscheduler.h and taskscheduler.rb but I don’t understand …

---

## [Latex and Ruby](https://www.ruby-forum.com/t/latex-and-ruby/94344)

<div class="topic-metadata">

**Author:** [@Jean-Etienne](https://www.ruby-forum.com/u/Jean-Etienne)\
**Replies:** 4\
**Last updated:** [May 3, 2006, 6:57pm UTC](https://www.ruby-forum.com/t/latex-and-ruby/94344 "2006-05-03T18:57:26Z")

</div>

Hi, I am looking for a library to convert Latex content to png and PDF. Does anyone know a stable one? Jean-Etienne

---

## [Re: Possible Ruby Bug?](https://www.ruby-forum.com/t/re-possible-ruby-bug/94392)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 0\
**Last updated:** [May 3, 2006, 6:57pm UTC](https://www.ruby-forum.com/t/re-possible-ruby-bug/94392 "2006-05-03T18:57:22Z")

</div>

page = open(‘http://google.com/’).read puts page end read\_a\_webpage Sorry for the late reply. There’s a bug fix in CVS that we haven’t released yet that may address this issue. Can you grab the latest from CVS …

---

## [Re: Win32API, CreateProcess and environment](https://www.ruby-forum.com/t/re-win32api-createprocess-and-environment/59327)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 0\
**Last updated:** [May 3, 2006, 6:57pm UTC](https://www.ruby-forum.com/t/re-win32api-createprocess-and-environment/59327 "2006-05-03T18:57:22Z")

</div>

From: Daniel B. removed\_email\_address@domain.invalid seems to work, except that if I attempt to pass an environment string, it causes the app to die instantly. What am I doing wrong? The ‘notepad’ process requir…

---

## [MySQL with windows](https://www.ruby-forum.com/t/mysql-with-windows/59184)

<div class="topic-metadata">

**Author:** [@jdruse](https://www.ruby-forum.com/u/jdruse)\
**Replies:** 1\
**Last updated:** [May 3, 2006, 6:57pm UTC](https://www.ruby-forum.com/t/mysql-with-windows/59184 "2006-05-03T18:57:01Z")

</div>

I am new to both ruby and am trying to install the API for mysql using the link http://raa.ruby-lang.org/project/mysql-ruby/. I am using version 1.8.4 for ruby and 5.0.19-nt for mysql. Following the readme-winpkg I en…

---

## [$SAFE question](https://www.ruby-forum.com/t/safe-question/94310)

<div class="topic-metadata">

**Author:** [@KroegerS\_Simon\_Sext](https://www.ruby-forum.com/u/KroegerS_Simon_Sext)\
**Replies:** 1\
**Last updated:** [May 3, 2006, 6:56pm UTC](https://www.ruby-forum.com/t/safe-question/94310 "2006-05-03T18:56:43Z")

</div>

Hello all, basically I just want to know if the code below is safe. Assume ‘dangerous.rb’ is provided by someone you don’t know and is located in a world writeable directory. The filename is as unsafe as the file its…

---

## [Re: Object browser, Smalltalk like Ruby environment](https://www.ruby-forum.com/t/re-object-browser-smalltalk-like-ruby-environment/94335)

<div class="topic-metadata">

**Author:** [@Wang\_Austin-W22255](https://www.ruby-forum.com/u/Wang_Austin-W22255)\
**Replies:** 3\
**Last updated:** [May 3, 2006, 6:56pm UTC](https://www.ruby-forum.com/t/re-object-browser-smalltalk-like-ruby-environment/94335 "2006-05-03T18:56:38Z")

</div>

Thanks for the feedback! Another issue: I want to dump the state of the Ruby interpreter and load it later. Just like the image file used in Smalltalk. I searched RAA and found: http://raa.ruby-lang.org/cat.rhtml?cat…

---

## [Cat2rafb (#77)](https://www.ruby-forum.com/t/cat2rafb-77/94387)

<div class="topic-metadata">

**Author:** [@aaronpowell](https://www.ruby-forum.com/u/aaronpowell)\
**Replies:** 0\
**Last updated:** [May 3, 2006, 6:56pm UTC](https://www.ruby-forum.com/t/cat2rafb-77/94387 "2006-05-03T18:56:33Z")

</div>

Here’s my solution, also available at http://rubyurl.com/XxX –Aaron Solution to \[QUIZ\] cat2rafb (#77) By Aaron P. require ‘rubygems’ require ‘mechanize’ require ‘getoptlong’ PASTE\_URL = ‘http://rafb.net/paste/’ R…

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

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