# Ruby

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

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

---

## [How to substitute group of words in a line with another text](https://www.ruby-forum.com/t/how-to-substitute-group-of-words-in-a-line-with-another-text/164669)

<div class="topic-metadata">

**Author:** [@mregupathy](https://www.ruby-forum.com/u/mregupathy)\
**Replies:** 2\
**Last updated:** [April 3, 2009, 9:06pm UTC](https://www.ruby-forum.com/t/how-to-substitute-group-of-words-in-a-line-with-another-text/164669 "2009-04-03T21:06:35Z")

</div>

I am trying to create a routine which will convert text to SMS lingo format. For example a sentence might contain “This should be done as soon as possible”. I have created a HASH which stores “ASAP” =\> “as soon as pos…

---

## [Why is "rb\_define\_method(rb\_cSymbol, ..." needed?](https://www.ruby-forum.com/t/why-is-rb-define-method-rb-csymbol-needed/164672)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 1\
**Last updated:** [April 3, 2009, 8:51pm UTC](https://www.ruby-forum.com/t/why-is-rb-define-method-rb-csymbol-needed/164672 "2009-04-03T20:51:46Z")

</div>

Hi, I’m inspecting the C code of String#capitalize method and have found the following: rb\_define\_method(rb\_cSymbol, “capitalize”, sym\_capitalize, 0); What is it need for? I didn’t add such line to my custom C method…

---

## [Review: File.chmod](https://www.ruby-forum.com/t/review-file-chmod/164670)

<div class="topic-metadata">

**Author:** [@Shri\_B](https://www.ruby-forum.com/u/Shri_B)\
**Replies:** 3\
**Last updated:** [April 3, 2009, 8:41pm UTC](https://www.ruby-forum.com/t/review-file-chmod/164670 "2009-04-03T20:41:48Z")

</div>

---

## [Rubyforge.org DNS registration down?](https://www.ruby-forum.com/t/rubyforge-org-dns-registration-down/164668)

<div class="topic-metadata">

**Author:** [@sthorpe](https://www.ruby-forum.com/u/sthorpe)\
**Replies:** 1\
**Last updated:** [April 3, 2009, 8:16pm UTC](https://www.ruby-forum.com/t/rubyforge-org-dns-registration-down/164668 "2009-04-03T20:16:03Z")

</div>

Anyone else having this problem? –Scott

---

## [ANN: Sequel 2.12.0 Released](https://www.ruby-forum.com/t/ann-sequel-2-12-0-released/164666)

<div class="topic-metadata">

**Author:** [@nerdmaster](https://www.ruby-forum.com/u/nerdmaster)\
**Replies:** 0\
**Last updated:** [April 3, 2009, 7:31pm UTC](https://www.ruby-forum.com/t/ann-sequel-2-12-0-released/164666 "2009-04-03T19:31:36Z")

</div>

Sequel is a lightweight database access toolkit for Ruby. Sequel provides thread safety, connection pooling and a concise DSL for constructing database queries and table schemas. Sequel also includes a lightweight but…

---

## [Hpricot 0.8.1](https://www.ruby-forum.com/t/hpricot-0-8-1/164663)

<div class="topic-metadata">

**Author:** [@S\_why](https://www.ruby-forum.com/u/S_why)\
**Replies:** 0\
**Last updated:** [April 3, 2009, 7:17pm UTC](https://www.ruby-forum.com/t/hpricot-0-8-1/164663 "2009-04-03T19:17:27Z")

</div>

Well, due to a very bad conflict between Hpricot 0.8 and 32-bit machines running Ruby 1.8, here’s an updated release. gem install hpricot --source http://code.whytheluckystiff.net Thanks to everybody who reported this…

---

## [An array problem](https://www.ruby-forum.com/t/an-array-problem/164570)

<div class="topic-metadata">

**Author:** [@georgeuoa](https://www.ruby-forum.com/u/georgeuoa)\
**Replies:** 8\
**Last updated:** [April 3, 2009, 6:21pm UTC](https://www.ruby-forum.com/t/an-array-problem/164570 "2009-04-03T18:21:12Z")

</div>

Hi i have a 3 arrays(A,B,C) which are results of some analysis. Array A has all members such that array B and C are actually subsets of A. The order of elements in array A is important. What i want is to list all mem…

---

## [Unable run \\copy command via PGconn.( exec || query )](https://www.ruby-forum.com/t/unable-run-copy-command-via-pgconn-exec-query/164646)

<div class="topic-metadata">

**Author:** [@ashikalim](https://www.ruby-forum.com/u/ashikalim)\
**Replies:** 2\
**Last updated:** [April 3, 2009, 6:17pm UTC](https://www.ruby-forum.com/t/unable-run-copy-command-via-pgconn-exec-query/164646 "2009-04-03T18:17:43Z")

</div>

Hi , I am facing problem while executing following code : require ‘postgres’ obj = PGconn.new( ‘192.168.1.156’,5432 ,’’,’’,‘tikono’,‘tikono’,‘tikono’ ) a = “\\COPY ivr\_interface.call\_flow(ref\_id,loaded\_time,menuid,…

---

## [(Ruby 1.9.1) error: â€˜struct RStringâ€™ has no memb er named â€˜ptrâ€™](https://www.ruby-forum.com/t/ruby-1-9-1-error-a-struct-rstringa-has-no-memb-er-named-a-ptra/164653)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 2\
**Last updated:** [April 3, 2009, 5:44pm UTC](https://www.ruby-forum.com/t/ruby-1-9-1-error-a-struct-rstringa-has-no-memb-er-named-a-ptra/164653 "2009-04-03T17:44:51Z")

</div>

Hi, trying to compile a C extension I get this error in Ruby 1.9.1: error: â€˜struct RStringâ€™ has no member named â€˜ptrâ€™ The code is: #include \<ruby.h\> #include \<stdio.h\> static VALUE my\_method(VALUE self, VAL…

---

## [Defined?(xxx) behaves differently when called from Silverlight](https://www.ruby-forum.com/t/defined-xxx-behaves-differently-when-called-from-silverlight/164506)

<div class="topic-metadata">

**Author:** [@thbar](https://www.ruby-forum.com/u/thbar)\
**Replies:** 13\
**Last updated:** [April 3, 2009, 5:25pm UTC](https://www.ruby-forum.com/t/defined-xxx-behaves-differently-when-called-from-silverlight/164506 "2009-04-03T17:25:51Z")

</div>

Hi, I noticed something that I didn’t expect while working with Silverlight. defined?(System::Windows::Forms::Control) throws an exception: MemberAccessException: uninitialized constant System::Windows::Forms à Iron…

---

## [Adding a method to String class as Ruby C extension](https://www.ruby-forum.com/t/adding-a-method-to-string-class-as-ruby-c-extension/164650)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 1\
**Last updated:** [April 3, 2009, 5:20pm UTC](https://www.ruby-forum.com/t/adding-a-method-to-string-class-as-ruby-c-extension/164650 "2009-04-03T17:20:50Z")

</div>

Hi, I want to add a method to String class, and I want this method to be defined in C. In the C code, to add a method I must do: rb\_define\_method(myClass, “hello”, hello, arg\_count); but I don’t know how to set myCla…

---

## [Rotate object in superengine for ruby](https://www.ruby-forum.com/t/rotate-object-in-superengine-for-ruby/164649)

<div class="topic-metadata">

**Author:** [@geasy](https://www.ruby-forum.com/u/geasy)\
**Replies:** 0\
**Last updated:** [April 3, 2009, 5:14pm UTC](https://www.ruby-forum.com/t/rotate-object-in-superengine-for-ruby/164649 "2009-04-03T17:14:38Z")

</div>

Hi I need help. I use a ruby superengine software to virtualize 3D object. This software use a ruby scripts. In this virtualizer I need rotate object. And aj dont know how to do it. For example i give to this page ex…

---

## [Unable run \\copy command via PGconn.( exec || query )](https://www.ruby-forum.com/t/unable-run-copy-command-via-pgconn-exec-query/164644)

<div class="topic-metadata">

**Author:** [@ashikalim](https://www.ruby-forum.com/u/ashikalim)\
**Replies:** 0\
**Last updated:** [April 3, 2009, 5:10pm UTC](https://www.ruby-forum.com/t/unable-run-copy-command-via-pgconn-exec-query/164644 "2009-04-03T17:10:00Z")

</div>

Hi , I am facing problem while executing following code : require ‘postgres’ obj = PGconn.new( ‘192.168.1.156’,5432 ,’’,’’,‘tikono’,‘tikono’,‘tikono’ ) a = “\\COPY ivr\_interface.call\_flow(ref\_id,loaded\_time,menuid,…

---

## [2.0: ARGV\[0\] Returns Something Even When It Should Be Empty](https://www.ruby-forum.com/t/2-0-argv-0-returns-something-even-when-it-should-be-empty/164593)

<div class="topic-metadata">

**Author:** [@Tom\_E\_Purl](https://www.ruby-forum.com/u/Tom_E_Purl)\
**Replies:** 1\
**Last updated:** [April 3, 2009, 4:11pm UTC](https://www.ruby-forum.com/t/2-0-argv-0-returns-something-even-when-it-should-be-empty/164593 "2009-04-03T16:11:42Z")

</div>

I have trouble imagining that I’m the first person to find this, but I couldn’t find anything about it on the mailing list. I have a script that checks command line arguments by inspecting the ARGV array. Here’s the …

---

## [Compiling problem with WxRuby on mswin-32, Ruby 1.9.1](https://www.ruby-forum.com/t/compiling-problem-with-wxruby-on-mswin-32-ruby-1-9-1/164639)

<div class="topic-metadata">

**Author:** [@quintus](https://www.ruby-forum.com/u/quintus)\
**Replies:** 0\
**Last updated:** [April 3, 2009, 3:11pm UTC](https://www.ruby-forum.com/t/compiling-problem-with-wxruby-on-mswin-32-ruby-1-9-1/164639 "2009-04-03T15:11:55Z")

</div>

Hi, I’m trying to compile WxRuby for my mswin32-version of Ruby 1.9.1 for some days now, but don’t get it to complete (I’m using the MSVC 2008 compiler on Win XP). First, this is the output of my “ruby -v”: ruby 1.9.…

---

## [\*BSD $B$G(B fork $B$G$-$J$$M}M3(B](https://www.ruby-forum.com/t/bsd-b-g-b-fork-b-g-j-m-m3-b/164347)

<div class="topic-metadata">

**Author:** [@KISHIMOTOS\_Makoto](https://www.ruby-forum.com/u/KISHIMOTOS_Makoto)\
**Replies:** 11\
**Last updated:** [April 3, 2009, 12:40pm UTC](https://www.ruby-forum.com/t/bsd-b-g-b-fork-b-g-j-m-m3-b/164347 "2009-04-03T12:40:09Z")

</div>

e$B$-$7$b$H$G$9e(B http://redmine.ruby-lang.org/issues/show/270 e$B$K$b$"$ke(B e$B!Ve(BFreeBSDe$B$de(BNetBSDe$B$O!$0lEYe(B pthread e$B$r:n$k$H!$8e;OKv$r$7$Fe(B e$B$be(B fork e$B8e!$e(Bpthread e$B$r:n$m$&$H$9$k$H;I$5…

---

## [Following url redirect](https://www.ruby-forum.com/t/following-url-redirect/164620)

<div class="topic-metadata">

**Author:** [@arunvoip](https://www.ruby-forum.com/u/arunvoip)\
**Replies:** 0\
**Last updated:** [April 3, 2009, 8:11am UTC](https://www.ruby-forum.com/t/following-url-redirect/164620 "2009-04-03T08:11:56Z")

</div>

Hi all, I’m using net/http in order to scrap html contents of different websites. As a preliminary requirement I also want to scrap the html data of the redirecting urls too. For that I used the following code respon…

---

## [Symbols garbage collector in Ruby1.9, fixed?](https://www.ruby-forum.com/t/symbols-garbage-collector-in-ruby1-9-fixed/164238)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 26\
**Last updated:** [April 3, 2009, 6:11am UTC](https://www.ruby-forum.com/t/symbols-garbage-collector-in-ruby1-9-fixed/164238 "2009-04-03T06:11:39Z")

</div>

Hi, in Ruby 1.8 there is an issue when adding more and more Symbols since they remain in memory and are never removed. I’m doing a server in Ruby that receives messages with headers (From, To, Subject, X-Custom-Header…

---

## [How to instanciate a System::String\[\] from IronRuby?](https://www.ruby-forum.com/t/how-to-instanciate-a-system-string-from-ironruby/164564)

<div class="topic-metadata">

**Author:** [@thbar](https://www.ruby-forum.com/u/thbar)\
**Replies:** 5\
**Last updated:** [April 3, 2009, 1:43am UTC](https://www.ruby-forum.com/t/how-to-instanciate-a-system-string-from-ironruby/164564 "2009-04-03T01:43:21Z")

</div>

Hi, while trying to call some C# code from IronRuby, I get this: my\_csharp\_class\_instance.call(%w(some array)) :0: can’t convert Array into System::String\[\] (TypeError) Is there some easy way to construct an array of…

---

## [Hash with files](https://www.ruby-forum.com/t/hash-with-files/164603)

<div class="topic-metadata">

**Author:** [@bloodniece](https://www.ruby-forum.com/u/bloodniece)\
**Replies:** 3\
**Last updated:** [April 3, 2009, 1:39am UTC](https://www.ruby-forum.com/t/hash-with-files/164603 "2009-04-03T01:39:50Z")

</div>

Hello all, I am trying to run File.size? on each file in my hash, yet I am getting this error. Goal ==\> get file sizes stored in hash from Dir.glob $ ruby test.rb yes test.rb:49:in size?': can't convert Array into …

---

## [Nilling for GC](https://www.ruby-forum.com/t/nilling-for-gc/164528)

<div class="topic-metadata">

**Author:** [@Paganoni](https://www.ruby-forum.com/u/Paganoni)\
**Replies:** 9\
**Last updated:** [April 3, 2009, 1:14am UTC](https://www.ruby-forum.com/t/nilling-for-gc/164528 "2009-04-03T01:14:42Z")

</div>

Hi, I’ve read that http://whytheluckystiff.net/articles/theFullyUpturnedBin.html. I have a background script that runs continuously and threads some tasks on demand. I keep track of the launched tasks but, by keeping …

---

## [\[Bug #1339\] 'cc' for LDSHARED and LIBRUBY\_LDSHARED on darwin\*](https://www.ruby-forum.com/t/bug-1339-cc-for-ldshared-and-libruby-ldshared-on-darwin/164375)

<div class="topic-metadata">

**Author:** [@Wataru\_Kimura](https://www.ruby-forum.com/u/Wataru_Kimura)\
**Replies:** 1\
**Last updated:** [April 3, 2009, 12:25am UTC](https://www.ruby-forum.com/t/bug-1339-cc-for-ldshared-and-libruby-ldshared-on-darwin/164375 "2009-04-03T00:25:00Z")

</div>

Bug #1339: ‘cc’ for LDSHARED and LIBRUBY\_LDSHARED on darwin\* http://redmine.ruby-lang.org/issues/show/1339 e$B5/I\<\<Te(B: Wataru Kimura e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal e$B%+%F%4%je(B: build ruby -v: ruby…

---

## [Testy.rb - ruby testing that's mad at the world](https://www.ruby-forum.com/t/testy-rb-ruby-testing-thats-mad-at-the-world/164164)

<div class="topic-metadata">

**Author:** [@ahoward](https://www.ruby-forum.com/u/ahoward)\
**Replies:** 54\
**Last updated:** [April 2, 2009, 11:36pm UTC](https://www.ruby-forum.com/t/testy-rb-ruby-testing-thats-mad-at-the-world/164164 "2009-04-02T23:36:25Z")

</div>

NAME testy.rb DESCRIPTION a BDD testing framework for ruby that’s mad at the world and plans to kick it’s ass in 80 freakin lines of code SYNOPSIS Testy.testing ‘your code’ do test ‘some behaviour’ do |result| u…

---

## [How to set the default year for DateTime.parse](https://www.ruby-forum.com/t/how-to-set-the-default-year-for-datetime-parse/164599)

<div class="topic-metadata">

**Author:** [@kyle\_s](https://www.ruby-forum.com/u/kyle_s)\
**Replies:** 0\
**Last updated:** [April 2, 2009, 11:35pm UTC](https://www.ruby-forum.com/t/how-to-set-the-default-year-for-datetime-parse/164599 "2009-04-02T23:35:50Z")

</div>

I’m running into an odd little issue. I banged out a quick script on my laptop (running ubuntu) this afternoon, and moved it over to one of my servers (running CentOS 5.2). Even though both have ruby 1.8, I ran into…

---

## [FYI review - Jirapong's fixes for GzipFile#finish](https://www.ruby-forum.com/t/fyi-review-jirapongs-fixes-for-gzipfile-finish/164590)

<div class="topic-metadata">

**Author:** [@Shri\_B](https://www.ruby-forum.com/u/Shri_B)\
**Replies:** 1\
**Last updated:** [April 2, 2009, 10:54pm UTC](https://www.ruby-forum.com/t/fyi-review-jirapongs-fixes-for-gzipfile-finish/164590 "2009-04-02T22:54:47Z")

</div>

FYI review only… This is Jirapong’s change. A big thanks to Jirapong for his first contribution to IronRuby! Looking forward to many more! I have pushed it to my fork. The individual commits are shown below, but ther…

---

## [SQLServer failing with activerecord\_jdbc 0.9.1](https://www.ruby-forum.com/t/sqlserver-failing-with-activerecord-jdbc-0-9-1/164454)

<div class="topic-metadata">

**Author:** [@cnick](https://www.ruby-forum.com/u/cnick)\
**Replies:** 5\
**Last updated:** [April 2, 2009, 9:40pm UTC](https://www.ruby-forum.com/t/sqlserver-failing-with-activerecord-jdbc-0-9-1/164454 "2009-04-02T21:40:18Z")

</div>

I am getting an error trying to use active\_record against a sqlserver database: ActiveRecord::ActiveRecordError: The conversion from ntext to BinaryStream is unsupported. Evidently this a new error in 0.9.1. Has an…

---

## [Ritex 0.2 released: Latex -\> MathML converter](https://www.ruby-forum.com/t/ritex-0-2-released-latex-mathml-converter/164559)

<div class="topic-metadata">

**Author:** [@trucker](https://www.ruby-forum.com/u/trucker)\
**Replies:** 5\
**Last updated:** [April 2, 2009, 9:34pm UTC](https://www.ruby-forum.com/t/ritex-0-2-released-latex-mathml-converter/164559 "2009-04-02T21:34:27Z")

</div>

It’s been almost four years since the last release, but I dusted off the ol’ codebase, fixed some bugs, added some features, and voila, a new release. Ritex turns “WebTeX” (essentially LaTeX math) into MathML. You can…

---

## [Help us: Migrating wiki to kenai.com](https://www.ruby-forum.com/t/help-us-migrating-wiki-to-kenai-com/163550)

<div class="topic-metadata">

**Author:** [@headius](https://www.ruby-forum.com/u/headius)\
**Replies:** 16\
**Last updated:** [April 2, 2009, 9:32pm UTC](https://www.ruby-forum.com/t/help-us-migrating-wiki-to-kenai-com/163550 "2009-04-02T21:32:06Z")

</div>

I have started migrating wiki.jruby.org to kenai.com at the following URL: http://kenai.com/projects/jruby/pages/Home I’ve gotten as far as updating the main page and updating immediately linked pages down through th…

---

## [Heist 0.2.0, now with full list support](https://www.ruby-forum.com/t/heist-0-2-0-now-with-full-list-support/164589)

<div class="topic-metadata">

**Author:** [@james-calivar](https://www.ruby-forum.com/u/james-calivar)\
**Replies:** 0\
**Last updated:** [April 2, 2009, 8:46pm UTC](https://www.ruby-forum.com/t/heist-0-2-0-now-with-full-list-support/164589 "2009-04-02T20:46:53Z")

</div>

Hi all, I just released the 0.2.0 version of Heist, my Ruby Scheme runtime. Changes in this release include: Entirely revised to correctly support lists as linked pairs Complete set of R5RS list functions Syntax for…

---

## [String#capitalize more complex](https://www.ruby-forum.com/t/string-capitalize-more-complex/164547)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 5\
**Last updated:** [April 2, 2009, 8:30pm UTC](https://www.ruby-forum.com/t/string-capitalize-more-complex/164547 "2009-04-02T20:30:27Z")

</div>

Hi, I receive headers (the protocol syntax allows them being lowcase, upcase or a mix). For example, the following header names are equivalent: a) Record-Route b) record-route c) RECORD-ROUTE d) Record-ROUTE I’m t…

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

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