# Ruby

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

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

---

## [Rubyforge 0.4.5 Released](https://www.ruby-forum.com/t/rubyforge-0-4-5-released/131658)

<div class="topic-metadata">

**Author:** [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Replies:** 1\
**Last updated:** [March 12, 2008, 6:42pm UTC](https://www.ruby-forum.com/t/rubyforge-0-4-5-released/131658 "2008-03-12T18:42:13Z")

</div>

rubyforge version 0.4.5 has been released! http://codeforpeople.rubyforge.org/rubyforge/ http://rubyforge.org/projects/codeforpeople/ A script which automates a limited set of rubyforge operations. Run ‘rubyforge he…

---

## [Yarv tutorial](https://www.ruby-forum.com/t/yarv-tutorial/131706)

<div class="topic-metadata">

**Author:** [@Vince\_F](https://www.ruby-forum.com/u/Vince_F)\
**Replies:** 1\
**Last updated:** [March 12, 2008, 5:38pm UTC](https://www.ruby-forum.com/t/yarv-tutorial/131706 "2008-03-12T17:38:49Z")

</div>

Hi all, I am interested in using YARV. Are there any tutorials out there? Thanks. Vince

---

## [Determine "owning" class?](https://www.ruby-forum.com/t/determine-owning-class/131411)

<div class="topic-metadata">

**Author:** [@dkmd\_nielsen](https://www.ruby-forum.com/u/dkmd_nielsen)\
**Replies:** 6\
**Last updated:** [March 12, 2008, 5:22pm UTC](https://www.ruby-forum.com/t/determine-owning-class/131411 "2008-03-12T17:22:13Z")

</div>

class A end class C def initialize x = \[A.new,A.new\] end def template x end end Is it possible for an instance of A to determine the instance of C that instantiated it? The application I’m working on has a cl…

---

## [Is IronRuby.sln supposed to compile fine at revision 76?](https://www.ruby-forum.com/t/is-ironruby-sln-supposed-to-compile-fine-at-revision-76/131700)

<div class="topic-metadata">

**Author:** [@thbar](https://www.ruby-forum.com/u/thbar)\
**Replies:** 2\
**Last updated:** [March 12, 2008, 5:04pm UTC](https://www.ruby-forum.com/t/is-ironruby-sln-supposed-to-compile-fine-at-revision-76/131700 "2008-03-12T17:04:25Z")

</div>

Hi, I’m finalizing an article which includes details on how to compile IronRuby. It seems that MsBuild IronRuby.sln doesn’t compile successfully at revision 76 (it’s looking for …....\\Runtime\\Microsoft.Scripting\\Mic…

---

## [Duplicating characters in a string](https://www.ruby-forum.com/t/duplicating-characters-in-a-string/131168)

<div class="topic-metadata">

**Author:** [@scudco](https://www.ruby-forum.com/u/scudco)\
**Replies:** 29\
**Last updated:** [March 12, 2008, 4:39pm UTC](https://www.ruby-forum.com/t/duplicating-characters-in-a-string/131168 "2008-03-12T16:39:36Z")

</div>

If i have a string “abc” and want to make it like this “aabbcc”, how do i go about it? I thought convert it into an array and then use string.map{|x| x \<\< x} though i havnt tested that yet. Is there a better way or a …

---

## [MurmurHash problem](https://www.ruby-forum.com/t/murmurhash-problem/131550)

<div class="topic-metadata">

**Author:** [@nobu](https://www.ruby-forum.com/u/nobu)\
**Replies:** 8\
**Last updated:** [March 12, 2008, 4:27pm UTC](https://www.ruby-forum.com/t/murmurhash-problem/131550 "2008-03-12T16:27:12Z")

</div>

e$B$J$+$@$G$9!#e(B At Tue, 11 Mar 2008 10:20:27 +0900 (JST), removed\_email\_address@domain.invalid wrote in \[ruby-cvs:22983\]: Log: \* string.c (hash): replaced by MurmurHash described in http://murmurhash.googlepages…

---

## [Computer trade shows?](https://www.ruby-forum.com/t/computer-trade-shows/131682)

<div class="topic-metadata">

**Author:** [@t3chn0n3rd](https://www.ruby-forum.com/u/t3chn0n3rd)\
**Replies:** 1\
**Last updated:** [March 12, 2008, 3:27pm UTC](https://www.ruby-forum.com/t/computer-trade-shows/131682 "2008-03-12T15:27:52Z")

</div>

are there any computer trade shows in your area?

---

## [Newbie question](https://www.ruby-forum.com/t/newbie-question/131462)

<div class="topic-metadata">

**Author:** [@fero](https://www.ruby-forum.com/u/fero)\
**Replies:** 13\
**Last updated:** [March 12, 2008, 2:50pm UTC](https://www.ruby-forum.com/t/newbie-question/131462 "2008-03-12T14:50:23Z")

</div>

is in ruby operator for: a = b if b a (operator) b ?

---

## [Active-Record Sql: selecting only few columns](https://www.ruby-forum.com/t/active-record-sql-selecting-only-few-columns/131678)

<div class="topic-metadata">

**Author:** [@rajatgarg](https://www.ruby-forum.com/u/rajatgarg)\
**Replies:** 2\
**Last updated:** [March 12, 2008, 1:59pm UTC](https://www.ruby-forum.com/t/active-record-sql-selecting-only-few-columns/131678 "2008-03-12T13:59:16Z")

</div>

Hi Guys, I am writing a sql query - User.find(:all, :order=\> ‘u.created\_on DESC’, :limit =\>2, :joins =\> “as u left join photos p on u.id = p.user\_id”) But i want this query to return only 3 parameters (name, photo\_ur…

---

## [Creating a file with $SIZE](https://www.ruby-forum.com/t/creating-a-file-with-size/131671)

<div class="topic-metadata">

**Author:** [@iPerfect](https://www.ruby-forum.com/u/iPerfect)\
**Replies:** 1\
**Last updated:** [March 12, 2008, 1:37pm UTC](https://www.ruby-forum.com/t/creating-a-file-with-size/131671 "2008-03-12T13:37:50Z")

</div>

Hi All, I would like create files of different size, taking size as user input. I need to check the data transfer rates from one network to another . In order to do this I will have to create files of diff size and w…

---

## [Passing only a hash key, with no value, as an option](https://www.ruby-forum.com/t/passing-only-a-hash-key-with-no-value-as-an-option/131677)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 6\
**Last updated:** [March 12, 2008, 1:35pm UTC](https://www.ruby-forum.com/t/passing-only-a-hash-key-with-no-value-as-an-option/131677 "2008-03-12T13:35:50Z")

</div>

I’m using the method of parameter passing where i have one ‘regular’ parameter and then a hash of options: def chunkify(something, options = {}) … end I want to have it so that the user can just pass a key through w…

---

## [Undefine instance var & \[\] (three questions)](https://www.ruby-forum.com/t/undefine-instance-var-three-questions/131664)

<div class="topic-metadata">

**Author:** [@fero](https://www.ruby-forum.com/u/fero)\
**Replies:** 2\
**Last updated:** [March 12, 2008, 12:41pm UTC](https://www.ruby-forum.com/t/undefine-instance-var-three-questions/131664 "2008-03-12T12:41:12Z")

</div>

Hi. Iam not very deep in ruby. Please answer: is the attr (method) slower than instance\_variable\_get/set ? How can I define \[\] for instance\_var\_get/set (like in struct) ? Is there a way to undefine @variable. I assign…

---

## [Console ShowASTs not working?](https://www.ruby-forum.com/t/console-showasts-not-working/131667)

<div class="topic-metadata">

**Author:** [@xjivan](https://www.ruby-forum.com/u/xjivan)\
**Replies:** 4\
**Last updated:** [March 12, 2008, 12:24pm UTC](https://www.ruby-forum.com/t/console-showasts-not-working/131667 "2008-03-12T12:24:02Z")

</div>

Hi I tried to view what AST’s was being generated when I executed a very simple class with the following command line rbx -X:ShowASTs test.rb class HelloWorld def initialize @msg = “hello world” end def print p…

---

## [Ruby Central matching Greg Brown donations, up to $5000!](https://www.ruby-forum.com/t/ruby-central-matching-greg-brown-donations-up-to-5000/131645)

<div class="topic-metadata">

**Author:** [@David\_ASBlack](https://www.ruby-forum.com/u/David_ASBlack)\
**Replies:** 2\
**Last updated:** [March 12, 2008, 10:40am UTC](https://www.ruby-forum.com/t/ruby-central-matching-greg-brown-donations-up-to-5000/131645 "2008-03-12T10:40:35Z")

</div>

Hello all – I’m pleased to announce that Ruby Central, Inc. is going to provide matching grant funds, dollar for dollar, for money donated to Greg Brown’s “Ruby Mendicant” project,\[1\] up to $5000. Thus the first $5000 …

---

## [Problem instralling gems](https://www.ruby-forum.com/t/problem-instralling-gems/131663)

<div class="topic-metadata">

**Author:** [@learningruby](https://www.ruby-forum.com/u/learningruby)\
**Replies:** 0\
**Last updated:** [March 12, 2008, 10:28am UTC](https://www.ruby-forum.com/t/problem-instralling-gems/131663 "2008-03-12T10:28:19Z")

</div>

I have problems installing gems on my ubuntu 7.04 machine. i haver installed ruby 1.8.6 and rubygems 1.0.x. I am directly connected to internet. When i try to install the gems , it throes some wierd errors sucha as: E…

---

## [Help needed regarding ruby-prof](https://www.ruby-forum.com/t/help-needed-regarding-ruby-prof/131662)

<div class="topic-metadata">

**Author:** [@learningruby](https://www.ruby-forum.com/u/learningruby)\
**Replies:** 0\
**Last updated:** [March 12, 2008, 9:54am UTC](https://www.ruby-forum.com/t/help-needed-regarding-ruby-prof/131662 "2008-03-12T09:54:15Z")

</div>

Hi all, Today I came accross ruby-prof and gave it a try on a simple program. I have installed the latest ruby-prof gem and patches for ruby. here is my code: require ‘rubygems’ require ‘ruby-prof’ RubyProf.measure\_…

---

## [Input using stdin](https://www.ruby-forum.com/t/input-using-stdin/131657)

<div class="topic-metadata">

**Author:** [@newarade47](https://www.ruby-forum.com/u/newarade47)\
**Replies:** 4\
**Last updated:** [March 12, 2008, 9:12am UTC](https://www.ruby-forum.com/t/input-using-stdin/131657 "2008-03-12T09:12:32Z")

</div>

How can I give input to a program using STDIN Suppose I want the program to take the value x=10 On some other site i found it as STDIN.read,but its not working.

---

## ["".to\_a isn't consistent with "string".to\_a](https://www.ruby-forum.com/t/to-a-isnt-consistent-with-string-to-a/131647)

<div class="topic-metadata">

**Author:** [@Clifford\_H](https://www.ruby-forum.com/u/Clifford_H)\
**Replies:** 3\
**Last updated:** [March 12, 2008, 5:10am UTC](https://www.ruby-forum.com/t/to-a-isnt-consistent-with-string-to-a/131647 "2008-03-12T05:10:41Z")

</div>

I’ve just been tripped up by this behaviour, which I haven’t seen documented anywhere: “hello”.to\_a #=\> \[“hello”\] “”.to\_a #=\> \[\] Why does an empty string get omitted from the array? Why doesn’t Enumerable#to\_a d…

---

## [Setting local variables via eval](https://www.ruby-forum.com/t/setting-local-variables-via-eval/131539)

<div class="topic-metadata">

**Author:** [@ara\_howard](https://www.ruby-forum.com/u/ara_howard)\
**Replies:** 15\
**Last updated:** [March 12, 2008, 4:29am UTC](https://www.ruby-forum.com/t/setting-local-variables-via-eval/131539 "2008-03-12T04:29:02Z")

</div>

thought some here might appreciate this http://drawohara.com/post/28514698 kind regards a @ http://codeforpeople.com/

---

## [Which is better -- method option or multiple methods?](https://www.ruby-forum.com/t/which-is-better-method-option-or-multiple-methods/131496)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 18\
**Last updated:** [March 12, 2008, 2:50am UTC](https://www.ruby-forum.com/t/which-is-better-method-option-or-multiple-methods/131496 "2008-03-12T02:50:32Z")

</div>

In the case of limited options, like the following example, which is better? class String def align(direction. spacing) case direction when :left … when :right … when :center … end end OR def align\_left(spa…

---

## [Command-set 0.10.4 Released](https://www.ruby-forum.com/t/command-set-0-10-4-released/131641)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [March 12, 2008, 2:47am UTC](https://www.ruby-forum.com/t/command-set-0-10-4-released/131641 "2008-03-12T02:47:36Z")

</div>

command-set version 0.10.4 has been released! CommandSet is a user interface framework. Its focus is a DSL for defining commands, much like Rake or RSpec. A default readline based terminal interpreter (complete with…

---

## [Orichalcum 0.5.0 Released](https://www.ruby-forum.com/t/orichalcum-0-5-0-released/131640)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [March 12, 2008, 2:45am UTC](https://www.ruby-forum.com/t/orichalcum-0-5-0-released/131640 "2008-03-12T02:45:50Z")

</div>

orichalcum version 0.5.0 has been released! Readline is a really useful library for textual user interfaces. Unfortunately, the Ruby interface has very limited functionality. This gem adds access to the full line buf…

---

## [Reding unicode characters?](https://www.ruby-forum.com/t/reding-unicode-characters/131443)

<div class="topic-metadata">

**Author:** [@martin\_mercy2001](https://www.ruby-forum.com/u/martin_mercy2001)\
**Replies:** 12\
**Last updated:** [March 12, 2008, 2:42am UTC](https://www.ruby-forum.com/t/reding-unicode-characters/131443 "2008-03-12T02:42:54Z")

</div>

Hi friends, Could any one help me in writing a method which reads all Unicode characters supported in ruby or else using regular expressions. Thanks in advance, Regards, Jose Martin

---

## [Ordered Collection](https://www.ruby-forum.com/t/ordered-collection/131551)

<div class="topic-metadata">

**Author:** [@tekhne](https://www.ruby-forum.com/u/tekhne)\
**Replies:** 9\
**Last updated:** [March 12, 2008, 1:24am UTC](https://www.ruby-forum.com/t/ordered-collection/131551 "2008-03-12T01:24:57Z")

</div>

If class X has a method \<=\>(aX), I can sort an Array containing instances of X using Array.sort!. What I really would like is an array that is always ordered. IOW, I want the object to be inserted at the correct locat…

---

## [Best practices for Ruby Meta-programming](https://www.ruby-forum.com/t/best-practices-for-ruby-meta-programming/131112)

<div class="topic-metadata">

**Author:** [@harshal](https://www.ruby-forum.com/u/harshal)\
**Replies:** 17\
**Last updated:** [March 12, 2008, 12:57am UTC](https://www.ruby-forum.com/t/best-practices-for-ruby-meta-programming/131112 "2008-03-12T00:57:22Z")

</div>

Dear all, Ruby meta-programming is a real fun. However no power comes without responsibility, so does the Ruby’s meta- programming. Can anybody share the experiences with meta-programming (for example, in writing DS…

---

## [Shiny New Code](https://www.ruby-forum.com/t/shiny-new-code/131608)

<div class="topic-metadata">

**Author:** [@mike-moscow](https://www.ruby-forum.com/u/mike-moscow)\
**Replies:** 6\
**Last updated:** [March 11, 2008, 11:47pm UTC](https://www.ruby-forum.com/t/shiny-new-code/131608 "2008-03-11T23:47:28Z")

</div>

Does anyone know when is the source code available on http://dynamicsilverlight.net/ going to be committed to the RubyForge SVN repo? Also, it looks like the DLR hosting API has changed. For example, the example co…

---

## [Revision](https://www.ruby-forum.com/t/revision/131597)

<div class="topic-metadata">

**Author:** [@jcain](https://www.ruby-forum.com/u/jcain)\
**Replies:** 4\
**Last updated:** [March 11, 2008, 10:11pm UTC](https://www.ruby-forum.com/t/revision/131597 "2008-03-11T22:11:25Z")

</div>

I’ve checked out revision 76 of IronRuby, and finally got it setup in VS2008 where everything was compiling. For some reason the VS project file looks for the sub-projects in the wrong locations, and you have to redi…

---

## [Knowing if the CLR/BCL is available](https://www.ruby-forum.com/t/knowing-if-the-clr-bcl-is-available/131609)

<div class="topic-metadata">

**Author:** [@dreamwave](https://www.ruby-forum.com/u/dreamwave)\
**Replies:** 1\
**Last updated:** [March 11, 2008, 9:56pm UTC](https://www.ruby-forum.com/t/knowing-if-the-clr-bcl-is-available/131609 "2008-03-11T21:56:02Z")

</div>

So what’s going to be the preferred way of knowing if your ruby app is running under IronRuby? RUBY\_PLATFORM can’t be used because it’s just i386-mswin32, this doesn’t tell us that CLR interop is available… could be …

---

## [Hartford Ruby Brigade's first meeting: a Tour of Facets](https://www.ruby-forum.com/t/hartford-ruby-brigades-first-meeting-a-tour-of-facets/197270)

<div class="topic-metadata">

**Author:** [@Dan\_Bernier](https://www.ruby-forum.com/u/Dan_Bernier)\
**Replies:** 0\
**Last updated:** [March 11, 2008, 8:47pm UTC](https://www.ruby-forum.com/t/hartford-ruby-brigades-first-meeting-a-tour-of-facets/197270 "2008-03-11T20:47:14Z")

</div>

The Hartford Ruby Brigade is having its first meeting, and we would love for you to attend! The first meeting will have a 45 minute to an hour presentation about the goodness that comes in the Ruby F.s gem. After that…

---

## [About updating gems](https://www.ruby-forum.com/t/about-updating-gems/131574)

<div class="topic-metadata">

**Author:** [@zoopzoop](https://www.ruby-forum.com/u/zoopzoop)\
**Replies:** 4\
**Last updated:** [March 11, 2008, 8:43pm UTC](https://www.ruby-forum.com/t/about-updating-gems/131574 "2008-03-11T20:43:05Z")

</div>

Hello everyone, I’m novice in linux, ruby and rails. I’ve reinstalled my ubuntu operative system, the ruby module, and also the rubygems module. After that I’ve updated rubygems by this command: sudo gem update --sys…

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

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