# Ruby

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

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

---

## [What is the correct way to extend native methods?](https://www.ruby-forum.com/t/what-is-the-correct-way-to-extend-native-methods/192522)

<div class="topic-metadata">

**Author:** [@olistik](https://www.ruby-forum.com/u/olistik)\
**Replies:** 14\
**Last updated:** [August 2, 2010, 4:47am UTC](https://www.ruby-forum.com/t/what-is-the-correct-way-to-extend-native-methods/192522 "2010-08-02T04:47:32Z")

</div>

Hello! suppose I want to modify Array.slice() (and consequentially, Array\[\]) in order to accept a RegExp as argument, and return values matching the regular expression. I tried to solve this problem in this way: clas…

---

## [RubyConf registration and Call For Proposals now open!](https://www.ruby-forum.com/t/rubyconf-registration-and-call-for-proposals-now-open/192550)

<div class="topic-metadata">

**Author:** [@David\_ASBlack](https://www.ruby-forum.com/u/David_ASBlack)\
**Replies:** 0\
**Last updated:** [August 1, 2010, 11:44pm UTC](https://www.ruby-forum.com/t/rubyconf-registration-and-call-for-proposals-now-open/192550 "2010-08-01T23:44:18Z")

</div>

Hi everyone – You can now register for RubyConf, and the Call For Proposals for conference talks is also open. More details and links at http://www.rubyconf.org. Registration is at the early-bird rate of $300 until S…

---

## [IronRuby Rake and -X:PrivateBrowsing](https://www.ruby-forum.com/t/ironruby-rake-and-x-privatebrowsing/192548)

<div class="topic-metadata">

**Author:** [@kevben](https://www.ruby-forum.com/u/kevben)\
**Replies:** 0\
**Last updated:** [August 1, 2010, 9:44pm UTC](https://www.ruby-forum.com/t/ironruby-rake-and-x-privatebrowsing/192548 "2010-08-01T21:44:39Z")

</div>

I’m trying to setup a Rake script to run all my IronRuby rspec tests. The tests need to have access to internal constructors and methods. IronRuby supports this with the -X:PrivateBinding switch on ir.exe. So, for exa…

---

## [Can't subclass IronRuby libraries ("super" doesn't resolve correctly)](https://www.ruby-forum.com/t/cant-subclass-ironruby-libraries-super-doesnt-resolve-correctly/192516)

<div class="topic-metadata">

**Author:** [@valdar](https://www.ruby-forum.com/u/valdar)\
**Replies:** 2\
**Last updated:** [August 1, 2010, 7:49pm UTC](https://www.ruby-forum.com/t/cant-subclass-ironruby-libraries-super-doesnt-resolve-correctly/192516 "2010-08-01T19:49:36Z")

</div>

I could use some help with Issue #4957 (http://ironruby.codeplex.com/workitem/4957). Does anyone know where super class ctors are resolved? I haven’t been able to spot where they are resolved in the code. -Charles

---

## [Could I build a video chat site with ruby on rails?](https://www.ruby-forum.com/t/could-i-build-a-video-chat-site-with-ruby-on-rails/192525)

<div class="topic-metadata">

**Author:** [@merc](https://www.ruby-forum.com/u/merc)\
**Replies:** 1\
**Last updated:** [August 1, 2010, 6:55pm UTC](https://www.ruby-forum.com/t/could-i-build-a-video-chat-site-with-ruby-on-rails/192525 "2010-08-01T18:55:45Z")

</div>

Take ustreamtv.com, for instance, would I be able to make a website like that with ruby on rails? Or what programming language does that?

---

## [Active Record Inheritance with out using type\_id](https://www.ruby-forum.com/t/active-record-inheritance-with-out-using-type-id/192493)

<div class="topic-metadata">

**Author:** [@morrisminor](https://www.ruby-forum.com/u/morrisminor)\
**Replies:** 2\
**Last updated:** [August 1, 2010, 5:01pm UTC](https://www.ruby-forum.com/t/active-record-inheritance-with-out-using-type-id/192493 "2010-08-01T17:01:36Z")

</div>

Hi, I am writing a script that queries a database for records with either the value ‘333’ or ‘444’ in a field called pin\_id in a table called pop. Currently I have created a model called GoodPop using set\_table\_name …

---

## [Beginner help needed: use a class def to create new instance](https://www.ruby-forum.com/t/beginner-help-needed-use-a-class-def-to-create-new-instance/192256)

<div class="topic-metadata">

**Author:** [@studlee2](https://www.ruby-forum.com/u/studlee2)\
**Replies:** 4\
**Last updated:** [August 1, 2010, 1:30pm UTC](https://www.ruby-forum.com/t/beginner-help-needed-use-a-class-def-to-create-new-instance/192256 "2010-08-01T13:30:42Z")

</div>

I am attempting to put as much code inside classes as possible, to economize the code in the main body. However, how do I create a new class instance using only a method defined in a class? For instance, in the follow…

---

## [Each method](https://www.ruby-forum.com/t/each-method/192511)

<div class="topic-metadata">

**Author:** [@amiref](https://www.ruby-forum.com/u/amiref)\
**Replies:** 2\
**Last updated:** [August 1, 2010, 1:20pm UTC](https://www.ruby-forum.com/t/each-method/192511 "2010-08-01T13:20:34Z")

</div>

Hi What can I do to can apply some change to an array for always ? ( I want to use iterator and each method and apply some change in an array )

---

## [Problem in 2 code](https://www.ruby-forum.com/t/problem-in-2-code/192507)

<div class="topic-metadata">

**Author:** [@amiref](https://www.ruby-forum.com/u/amiref)\
**Replies:** 3\
**Last updated:** [August 1, 2010, 10:14am UTC](https://www.ruby-forum.com/t/problem-in-2-code/192507 "2010-08-01T10:14:15Z")

</div>

Hi I dont understand results of these 2 code ? please explain me what do every code do ? 1 - x = “This is a test”.match( /(\\w+)(\\w+)/ ) puts x\[0\] puts x\[1\] puts x\[2\] 2 - x = “This is a test”.match( /(\\w+) (\\w+)/…

---

## [Using custom controls with gestalt](https://www.ruby-forum.com/t/using-custom-controls-with-gestalt/182214)

<div class="topic-metadata">

**Author:** [@mroths](https://www.ruby-forum.com/u/mroths)\
**Replies:** 4\
**Last updated:** [August 1, 2010, 9:06am UTC](https://www.ruby-forum.com/t/using-custom-controls-with-gestalt/182214 "2010-08-01T09:06:57Z")

</div>

I’m preparing some demos of using silverlight+ironruby with gestalt. It’s really impressive but i’d like to show an example using the bing map control but can’t work out how to make external controls available. Here’…

---

## [Argument Error](https://www.ruby-forum.com/t/argument-error/192509)

<div class="topic-metadata">

**Author:** [@humandictionary](https://www.ruby-forum.com/u/humandictionary)\
**Replies:** 2\
**Last updated:** [August 1, 2010, 8:32am UTC](https://www.ruby-forum.com/t/argument-error/192509 "2010-08-01T08:32:25Z")

</div>

Hi. I’m learning Ruby and I want to know how to make a script have an argument, i.e. ruby script.rb 3 2 So far I have this: abort “Correct syntax is ruby \[script\].rb \[number to exponentially multiply by\] \[exponent\]…

---

## [How to bind a WPF datagrid to ActiveRecord object](https://www.ruby-forum.com/t/how-to-bind-a-wpf-datagrid-to-activerecord-object/192521)

<div class="topic-metadata">

**Author:** [@michbukana](https://www.ruby-forum.com/u/michbukana)\
**Replies:** 0\
**Last updated:** [August 1, 2010, 3:07am UTC](https://www.ruby-forum.com/t/how-to-bind-a-wpf-datagrid-to-activerecord-object/192521 "2010-08-01T03:07:03Z")

</div>

Hi all, I need some guidance on how to bind a WPF datagrid to an array produced by ActiveRecord: a = SomeTable.find(:all) Any suggestions? Thank you in advance Eduardo B.

---

## [Help resolving Issue #4957](https://www.ruby-forum.com/t/help-resolving-issue-4957/192510)

<div class="topic-metadata">

**Author:** [@valdar](https://www.ruby-forum.com/u/valdar)\
**Replies:** 0\
**Last updated:** [August 1, 2010, 12:15am UTC](https://www.ruby-forum.com/t/help-resolving-issue-4957/192510 "2010-08-01T00:15:30Z")

</div>

I could use some help with Issue #4957 ( http://ironruby.codeplex.com/workitem/4957). Does anyone know where super class ctors are resolved? I’ve spent the past 5 hours stepping through code trying to find it, but n…

---

## [How do I run a text.txt or a analyzer.rb](https://www.ruby-forum.com/t/how-do-i-run-a-text-txt-or-a-analyzer-rb/192504)

<div class="topic-metadata">

**Author:** [@merc](https://www.ruby-forum.com/u/merc)\
**Replies:** 2\
**Last updated:** [July 31, 2010, 10:22pm UTC](https://www.ruby-forum.com/t/how-do-i-run-a-text-txt-or-a-analyzer-rb/192504 "2010-07-31T22:22:32Z")

</div>

Hi, everyone. How do I run a .rb file in command prompt? I was in the command prompt, using irb, but I don’t understand why my .rb files looks like a regular text file. And I don’t know how to execute them either. Is…

---

## [Ordered active record attributes hash](https://www.ruby-forum.com/t/ordered-active-record-attributes-hash/192484)

<div class="topic-metadata">

**Author:** [@michbukana](https://www.ruby-forum.com/u/michbukana)\
**Replies:** 1\
**Last updated:** [July 31, 2010, 9:32pm UTC](https://www.ruby-forum.com/t/ordered-active-record-attributes-hash/192484 "2010-07-31T21:32:26Z")

</div>

Hi All: I’m trying to traverse the active record attributes hash in the order it was created. a = Table.find\_by\_sql(“select \* from sometable”) a.each { |row| puts row.to\_yaml prints the the attributes in the order co…

---

## [What is the syntax for passing a File to a Class?](https://www.ruby-forum.com/t/what-is-the-syntax-for-passing-a-file-to-a-class/192505)

<div class="topic-metadata">

**Author:** [@goodfriend](https://www.ruby-forum.com/u/goodfriend)\
**Replies:** 1\
**Last updated:** [July 31, 2010, 9:02pm UTC](https://www.ruby-forum.com/t/what-is-the-syntax-for-passing-a-file-to-a-class/192505 "2010-07-31T21:02:21Z")

</div>

Hi, I have a log file that I’ve created using the simple command: logFile = File.new("../LOGS/IF4IT.log", "w") I can easily write to it at a global level using syntax like: logFile.puts 'Write this string to logFile.…

---

## [Accessing local variables dynamically](https://www.ruby-forum.com/t/accessing-local-variables-dynamically/192506)

<div class="topic-metadata">

**Author:** [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Replies:** 1\
**Last updated:** [July 31, 2010, 8:58pm UTC](https://www.ruby-forum.com/t/accessing-local-variables-dynamically/192506 "2010-07-31T20:58:06Z")

</div>

I have a collection of variables named @a\_something, @c\_something, @f\_something, @y\_something, @z\_something I want to do something like def some\_thing(one\_char) xxx = XXXX(’@’+one\_char+’\_something’) subr(xxx) end I…

---

## [Performance issues with json\_pure under IronRuby](https://www.ruby-forum.com/t/performance-issues-with-json-pure-under-ironruby/192448)

<div class="topic-metadata">

**Author:** [@murena](https://www.ruby-forum.com/u/murena)\
**Replies:** 4\
**Last updated:** [July 31, 2010, 6:43pm UTC](https://www.ruby-forum.com/t/performance-issues-with-json-pure-under-ironruby/192448 "2010-07-31T18:43:37Z")

</div>

Hi, yesterday I was testing the json library under IronRuby and, comparisons with other implementations aside, I noticed that the “pure” variant performs so bad under IronRuby that it just doesn’t feel normal at all.…

---

## [Netbeans and rackup](https://www.ruby-forum.com/t/netbeans-and-rackup/192499)

<div class="topic-metadata">

**Author:** [@Thomas\_HSSS\_hn](https://www.ruby-forum.com/u/Thomas_HSSS_hn)\
**Replies:** 0\
**Last updated:** [July 31, 2010, 6:30pm UTC](https://www.ruby-forum.com/t/netbeans-and-rackup/192499 "2010-07-31T18:30:44Z")

</div>

Hi I’m currently dabbling with Rack. For that I have created a Ruby project in Netbeans 6.9 with an application class in a Ruby source file and a rackup configuration file config.ru. But how can I configure the proje…

---

## [Problem with a lambda not executing immediately](https://www.ruby-forum.com/t/problem-with-a-lambda-not-executing-immediately/192415)

<div class="topic-metadata">

**Author:** [@fipa](https://www.ruby-forum.com/u/fipa)\
**Replies:** 6\
**Last updated:** [July 31, 2010, 5:00pm UTC](https://www.ruby-forum.com/t/problem-with-a-lambda-not-executing-immediately/192415 "2010-07-31T17:00:00Z")

</div>

Hi, I’m using the paperclip plugin for one of my rails app, but my problem is pure Ruby. I’m not good enough with Ruby and lambdas so I need your advice. Here is the code I am trying to make work: class Asset \< Acti…

---

## [About unknown charaters shows](https://www.ruby-forum.com/t/about-unknown-charaters-shows/192490)

<div class="topic-metadata">

**Author:** [@pshah](https://www.ruby-forum.com/u/pshah)\
**Replies:** 0\
**Last updated:** [July 31, 2010, 1:28pm UTC](https://www.ruby-forum.com/t/about-unknown-charaters-shows/192490 "2010-07-31T13:28:38Z")

</div>

Hi, I read some html source and remove all tags and just take the contents. So when i see that contents in ruby output it shows me unknown charaters like “-Ã¡” and it shows inplace hello so it shows like “hello-Ã¡”…

---

## [Will the performance catch up be next milestone?](https://www.ruby-forum.com/t/will-the-performance-catch-up-be-next-milestone/192366)

<div class="topic-metadata">

**Author:** [@ray\_linn](https://www.ruby-forum.com/u/ray_linn)\
**Replies:** 12\
**Last updated:** [July 31, 2010, 11:45am UTC](https://www.ruby-forum.com/t/will-the-performance-catch-up-be-next-milestone/192366 "2010-07-31T11:45:44Z")

</div>

IBM Engineer completed a performance benchmark for rubys, seems ir does not well done in the performance.

---

## [How to find difference between two strings](https://www.ruby-forum.com/t/how-to-find-difference-between-two-strings/192455)

<div class="topic-metadata">

**Author:** [@pshah](https://www.ruby-forum.com/u/pshah)\
**Replies:** 6\
**Last updated:** [July 31, 2010, 8:11am UTC](https://www.ruby-forum.com/t/how-to-find-difference-between-two-strings/192455 "2010-07-31T08:11:30Z")

</div>

Hi, I have two strings, like @a = “hello” @b = “h123llo” so in that how can i print diffrence? i want difference like user know which diffrence on which character. Please let me know if any one know. Thanks in adv…

---

## [Databinding in WPF against IronRuby objects](https://www.ruby-forum.com/t/databinding-in-wpf-against-ironruby-objects/192487)

<div class="topic-metadata">

**Author:** [@bguan](https://www.ruby-forum.com/u/bguan)\
**Replies:** 1\
**Last updated:** [July 31, 2010, 7:51am UTC](https://www.ruby-forum.com/t/databinding-in-wpf-against-ironruby-objects/192487 "2010-07-31T07:51:36Z")

</div>

All, I posted this on StackOvervlow, but I thought I would notify this list of my question, in case someone here understands what is going on… Basically, I am finding that data binding to properties on IronRuby obje…

---

## [Binary encode 7 (\[7\].pack("C")) as "\\007" instead of "\\a"](https://www.ruby-forum.com/t/binary-encode-7-7-pack-c-as-007-instead-of-a/192428)

<div class="topic-metadata">

**Author:** [@woahdae](https://www.ruby-forum.com/u/woahdae)\
**Replies:** 3\
**Last updated:** [July 30, 2010, 11:26pm UTC](https://www.ruby-forum.com/t/binary-encode-7-7-pack-c-as-007-instead-of-a/192428 "2010-07-30T23:26:30Z")

</div>

I have a problem that’s on the borders of ruby and erlang, but I’m beginning to think the solution won’t be from the erlang side of things. (and forgive me for my haziness with the terminology here…) The basic problem…

---

## [Common.proj](https://www.ruby-forum.com/t/common-proj/192450)

<div class="topic-metadata">

**Author:** [@Jb\_Evain](https://www.ruby-forum.com/u/Jb_Evain)\
**Replies:** 2\
**Last updated:** [July 30, 2010, 9:38pm UTC](https://www.ruby-forum.com/t/common-proj/192450 "2010-07-30T21:38:16Z")

</div>

Hey, All csproj now refer to Solutions/Common.proj which isn’t in the git tree. Please check it in :slight\_smile: Thanks,

---

## [Start IRB from script](https://www.ruby-forum.com/t/start-irb-from-script/191902)

<div class="topic-metadata">

**Author:** [@Makaru\_K](https://www.ruby-forum.com/u/Makaru_K)\
**Replies:** 3\
**Last updated:** [July 30, 2010, 8:53pm UTC](https://www.ruby-forum.com/t/start-irb-from-script/191902 "2010-07-30T20:53:47Z")

</div>

Dear All, Can I start swing IRB from JSR 223 Script? I add jruby-complete to the class path and try to start IRB. It does not show a command prompt and when I press tab, the following exception occurs: Exception in t…

---

## [How do I upload an image with Sinatra (like Paperclip)?](https://www.ruby-forum.com/t/how-do-i-upload-an-image-with-sinatra-like-paperclip/173441)

<div class="topic-metadata">

**Author:** [@bagadoughnuts](https://www.ruby-forum.com/u/bagadoughnuts)\
**Replies:** 8\
**Last updated:** [July 30, 2010, 7:03pm UTC](https://www.ruby-forum.com/t/how-do-i-upload-an-image-with-sinatra-like-paperclip/173441 "2010-07-30T19:03:19Z")

</div>

Hi all, I need to upload an image from my local computer to a web server and store the location in a database (similar to how Paperclip and attachment\_fu work) in Sinatra. Any ideas on how to get this to work? Thank…

---

## [Extending interfaces - not possible, right? :)](https://www.ruby-forum.com/t/extending-interfaces-not-possible-right/192426)

<div class="topic-metadata">

**Author:** [@trejkaz](https://www.ruby-forum.com/u/trejkaz)\
**Replies:** 1\
**Last updated:** [July 30, 2010, 7:02pm UTC](https://www.ruby-forum.com/t/extending-interfaces-not-possible-right/192426 "2010-07-30T19:02:33Z")

</div>

Hi all. It’s Friday, so I thought I’d try to do something crazy. We have a split interface/implementation type of API in use, something like this: // In public documentation package acme; interface Item { List\<It…

---

## [Problem building source - misleading information in Wiki (dev.bat)](https://www.ruby-forum.com/t/problem-building-source-misleading-information-in-wiki-dev-bat/192432)

<div class="topic-metadata">

**Author:** [@Jonas\_FollesSSSS](https://www.ruby-forum.com/u/Jonas_FollesSSSS)\
**Replies:** 1\
**Last updated:** [July 30, 2010, 6:07pm UTC](https://www.ruby-forum.com/t/problem-building-source-misleading-information-in-wiki-dev-bat/192432 "2010-07-30T18:07:30Z")

</div>

Hi guys, I’m planning to make some changes to the IronPython Silverlight hosting, to enable a writable virtual file system. So in order to do that I tried to set up a new development environment (virtual machine) fr…

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

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