# Ruby

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

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

---

## [Introduction to ruby video available from osbootcamp.org](https://www.ruby-forum.com/t/introduction-to-ruby-video-available-from-osbootcamp-org/147955)

<div class="topic-metadata">

**Author:** [@Andrew\_Ross](https://www.ruby-forum.com/u/Andrew_Ross)\
**Replies:** 0\
**Last updated:** [September 7, 2008, 4:05pm UTC](https://www.ruby-forum.com/t/introduction-to-ruby-video-available-from-osbootcamp-org/147955 "2008-09-07T16:05:28Z")

</div>

Hi All, Open Source Bootcamp (osbootcamp) teaches skills with open source. We recently had a Ruby talk which we’ve recorded and made freely available from the osbootcamp.org videos section. Enjoy! Andrew

---

## [RMagick problem: Image::read works well but Image::from\_blob](https://www.ruby-forum.com/t/rmagick-problem-image-read-works-well-but-image-from-blob/68910)

<div class="topic-metadata">

**Author:** [@Mike\_Meng](https://www.ruby-forum.com/u/Mike_Meng)\
**Replies:** 4\
**Last updated:** [September 7, 2008, 2:28pm UTC](https://www.ruby-forum.com/t/rmagick-problem-image-read-works-well-but-image-from-blob/68910 "2008-09-07T14:28:40Z")

</div>

Hi all, I want to determine the geometry of an image. The image file may be in local harddisk or on web. So I use open-uri and Magick::Image::from\_blob to do that work, here is the code: open(’’) { |f| image = Magic…

---

## [How to fetch images from web page with relative path](https://www.ruby-forum.com/t/how-to-fetch-images-from-web-page-with-relative-path/147778)

<div class="topic-metadata">

**Author:** [@yzheng](https://www.ruby-forum.com/u/yzheng)\
**Replies:** 6\
**Last updated:** [September 7, 2008, 2:18pm UTC](https://www.ruby-forum.com/t/how-to-fetch-images-from-web-page-with-relative-path/147778 "2008-09-07T14:18:14Z")

</div>

Hi, all here is the code, it works when the image has a full path, but I met some pages which only gives relative path for images. How to handle this condition? Thanks a lot! def self.get\_magick\_img\_from\_url(url) b…

---

## [How to telnet to a host?](https://www.ruby-forum.com/t/how-to-telnet-to-a-host/147943)

<div class="topic-metadata">

**Author:** [@youhaodeyi](https://www.ruby-forum.com/u/youhaodeyi)\
**Replies:** 1\
**Last updated:** [September 7, 2008, 12:32pm UTC](https://www.ruby-forum.com/t/how-to-telnet-to-a-host/147943 "2008-09-07T12:32:28Z")

</div>

I use this code to telnet to a Windows Xp machine. tn=Net::Telnet.new(“Host” =\> “localhost”,“Timeout” =\> 10,“Prompt” =\> /\[$%#\>\] \\z/n) tn.login(“user”, “123456”){|c| print c} The output will be: " Welcome to Microso…

---

## [While loop : execute code and THEN check condition](https://www.ruby-forum.com/t/while-loop-execute-code-and-then-check-condition/147928)

<div class="topic-metadata">

**Author:** [@scudco](https://www.ruby-forum.com/u/scudco)\
**Replies:** 3\
**Last updated:** [September 7, 2008, 12:25pm UTC](https://www.ruby-forum.com/t/while-loop-execute-code-and-then-check-condition/147928 "2008-09-07T12:25:20Z")

</div>

Im sure this was possible in C but in ruby i couldnt find something similiar. I want a control structure which will execute the code first and then check if the condition is true or not. something like do something …

---

## [Extend OpenStruct's functionality with explicit default value](https://www.ruby-forum.com/t/extend-openstructs-functionality-with-explicit-default-value/147787)

<div class="topic-metadata">

**Author:** [@robkuz](https://www.ruby-forum.com/u/robkuz)\
**Replies:** 9\
**Last updated:** [September 7, 2008, 11:30am UTC](https://www.ruby-forum.com/t/extend-openstructs-functionality-with-explicit-default-value/147787 "2008-09-07T11:30:16Z")

</div>

Hi, I just had a use case where I wanted to have several counters and not store them in a Hash because of the nicer syntax of OpenStruct. Currently, the code has to do counters = OpenStruct.new … counters.foo ||= 0 …

---

## [String sanitizing](https://www.ruby-forum.com/t/string-sanitizing/147842)

<div class="topic-metadata">

**Author:** [@travis](https://www.ruby-forum.com/u/travis)\
**Replies:** 6\
**Last updated:** [September 7, 2008, 10:43am UTC](https://www.ruby-forum.com/t/string-sanitizing/147842 "2008-09-07T10:43:26Z")

</div>

I have implemented a sanitize! method into the String class to properly erase Strings from memory (example usage: clearing a password from memory), but I want to make sure that what I’m doing is actually doing what I …

---

## [How to change ASCI to Hex](https://www.ruby-forum.com/t/how-to-change-asci-to-hex/147929)

<div class="topic-metadata">

**Author:** [@slaughter](https://www.ruby-forum.com/u/slaughter)\
**Replies:** 8\
**Last updated:** [September 7, 2008, 10:23am UTC](https://www.ruby-forum.com/t/how-to-change-asci-to-hex/147929 "2008-09-07T10:23:33Z")

</div>

hi everyone: I want to change ASCI to Hex,which i receive in the UDPSocket,but it just report error my code is: server = UDPSocket.open server.bind(‘192.168.203.108’, $port) s= server.recvfrom(164) s=s\[0\] s=Int…

---

## [Open3 : tcgetattr: Inappropriate ioctl for device](https://www.ruby-forum.com/t/open3-tcgetattr-inappropriate-ioctl-for-device/147937)

<div class="topic-metadata">

**Author:** [@Une\_BSSSSvS\_ue](https://www.ruby-forum.com/u/Une_BSSSSvS_ue)\
**Replies:** 0\
**Last updated:** [September 7, 2008, 9:45am UTC](https://www.ruby-forum.com/t/open3-tcgetattr-inappropriate-ioctl-for-device/147937 "2008-09-07T09:45:29Z")

</div>

I’m using Open3 to simulate a pseudo-terminal connection with ssh. Everything seems to work well except i get the following warning/error when connecting : tcgetattr: Inappropriate ioctl for device here is my ruby co…

---

## [Did any build ironruby successfully in Mono?](https://www.ruby-forum.com/t/did-any-build-ironruby-successfully-in-mono/147886)

<div class="topic-metadata">

**Author:** [@ksunair](https://www.ruby-forum.com/u/ksunair)\
**Replies:** 4\
**Last updated:** [September 7, 2008, 9:36am UTC](https://www.ruby-forum.com/t/did-any-build-ironruby-successfully-in-mono/147886 "2008-09-07T09:36:42Z")

</div>

Just curious, I just checked out 140 from svn and when I build I am getting basename not found in string… Just curious…

---

## [(no subject)](https://www.ruby-forum.com/t/no-subject/147934)

<div class="topic-metadata">

**Author:** [@tomi-zeev](https://www.ruby-forum.com/u/tomi-zeev)\
**Replies:** 0\
**Last updated:** [September 7, 2008, 7:12am UTC](https://www.ruby-forum.com/t/no-subject/147934 "2008-09-07T07:12:20Z")

</div>

unsubscribe

---

## [\[Bug #548\](Closed) segmentetion fault by socket connection](https://www.ruby-forum.com/t/bug-548-closed-segmentetion-fault-by-socket-connection/147930)

<div class="topic-metadata">

**Author:** [@Narihiro\_N](https://www.ruby-forum.com/u/Narihiro_N)\
**Replies:** 0\
**Last updated:** [September 7, 2008, 4:59am UTC](https://www.ruby-forum.com/t/bug-548-closed-segmentetion-fault-by-socket-connection/147930 "2008-09-07T04:59:37Z")

</div>

e$B%A%1%C%He(B #548 e$B$,99?7$5$l$^$7$?!#e(B (by Narihiro N.) e$B%9%F!\<%?%9e(B Opene$B$+$ie(BClosede$B$KJQ99e(B e$BCfB\<$G$9!#e(B e$B$9$\_$^$;$s!#C1$Ke(B make install e$B$7K:$l$F$$$^$7$?!#!#!#e(B e$B;d$N4D6-$G$be(B ma…

---

## [Pog 1.1](https://www.ruby-forum.com/t/pog-1-1/147923)

<div class="topic-metadata">

**Author:** [@tekwiz](https://www.ruby-forum.com/u/tekwiz)\
**Replies:** 0\
**Last updated:** [September 7, 2008, 3:43am UTC](https://www.ruby-forum.com/t/pog-1-1/147923 "2008-09-07T03:43:37Z")

</div>

POG - Password Operations Gem Version 1.1 Released http://pog.rubyforge.org POG Version 1.1 has been released. This version finalizes the API and adds a password sanitation feature to remove a password string from me…

---

## [Question About TCPServer & TCPSocket classes](https://www.ruby-forum.com/t/question-about-tcpserver-tcpsocket-classes/147863)

<div class="topic-metadata">

**Author:** [@Steve\_Lewis](https://www.ruby-forum.com/u/Steve_Lewis)\
**Replies:** 4\
**Last updated:** [September 7, 2008, 3:05am UTC](https://www.ruby-forum.com/t/question-about-tcpserver-tcpsocket-classes/147863 "2008-09-07T03:05:32Z")

</div>

Hello Rubyists, I’ve been messing around with socket programming in Ruby lately, and I’ve hit a snag with some of my experiments. My first, (successful), experiment was to create a basic client/server script wherein…

---

## [Convert special characters from HTML to utf-8 or iso-8859-1](https://www.ruby-forum.com/t/convert-special-characters-from-html-to-utf-8-or-iso-8859-1/147907)

<div class="topic-metadata">

**Author:** [@Axel\_E](https://www.ruby-forum.com/u/Axel_E)\
**Replies:** 1\
**Last updated:** [September 7, 2008, 1:51am UTC](https://www.ruby-forum.com/t/convert-special-characters-from-html-to-utf-8-or-iso-8859-1/147907 "2008-09-07T01:51:16Z")

</div>

Dear all, is there a gem available that will transform things like “�” into a long dash, “’” into an apostrophe and so on ? I think someone posted about this about a week ago, but I can’t absolutely find it anymore. …

---

## [What are the bundled Java classes](https://www.ruby-forum.com/t/what-are-the-bundled-java-classes/147916)

<div class="topic-metadata">

**Author:** [@kampers](https://www.ruby-forum.com/u/kampers)\
**Replies:** 2\
**Last updated:** [September 7, 2008, 1:17am UTC](https://www.ruby-forum.com/t/what-are-the-bundled-java-classes/147916 "2008-09-07T01:17:57Z")

</div>

We can use import ‘class’ for the bundled classes, and we use import\_class ‘class’ for the unbundled classes. I assume that the bundled classes are the standard Java API? If not, then what? Chris To unsubscribe from…

---

## [\[Bug #491\] make$B$,(B"string contains null byte"$B$G\<:GT$7$^$9(B](https://www.ruby-forum.com/t/bug-491-make-b-b-string-contains-null-byte-b-g-gt-7-9-b/146765)

<div class="topic-metadata">

**Author:** [@Nobuhiro\_Tachino](https://www.ruby-forum.com/u/Nobuhiro_Tachino)\
**Replies:** 1\
**Last updated:** [September 7, 2008, 12:17am UTC](https://www.ruby-forum.com/t/bug-491-make-b-b-string-contains-null-byte-b-g-gt-7-9-b/146765 "2008-09-07T00:17:43Z")

</div>

Bug #491: makee$B$,e(B"string contains null byte"e$B$G\<:GT$7$^$9e(B http://redmine.ruby-lang.org/issues/show/491 e$B5/I\<\<Te(B: Nobuhiro Tachino e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal e$B%+%F%4%je(B: core e$BEa…

---

## [\[Bug #548\] segmentetion fault by socket connection](https://www.ruby-forum.com/t/bug-548-segmentetion-fault-by-socket-connection/147911)

<div class="topic-metadata">

**Author:** [@Yukihiro\_M](https://www.ruby-forum.com/u/Yukihiro_M)\
**Replies:** 0\
**Last updated:** [September 6, 2008, 10:55pm UTC](https://www.ruby-forum.com/t/bug-548-segmentetion-fault-by-socket-connection/147911 "2008-09-06T22:55:09Z")

</div>

e$B%A%1%C%He(B #548 e$B$,99?7$5$l$^$7$?!#e(B (by Yukihiro M.) e$B$&$A$G$O:F8=$7$^$;$s$M!#F1$8e(Bi686-linuxe$B$J$N$K!#e(B -ve$B$N=PNOe(Brevision 18218e$B$O$+$J$j8E$$$G$9$,!“$3$l$OC1$Ke(Bmake upe$B$7$F$$$J$$$@$1$G$7$g$&…

---

## [Can't install any gems](https://www.ruby-forum.com/t/cant-install-any-gems/147910)

<div class="topic-metadata">

**Author:** [@joshua-asem](https://www.ruby-forum.com/u/joshua-asem)\
**Replies:** 0\
**Last updated:** [September 6, 2008, 10:30pm UTC](https://www.ruby-forum.com/t/cant-install-any-gems/147910 "2008-09-06T22:30:26Z")

</div>

I’m on Mac OS X running Rails 2.1, Ruby 1.8.6, gem version 1.1.0 and anytime I try installing any gem, I get a GemNotFoundException. I tried deleting the source\_cache but still no luck. My latest try at gem update rai…

---

## [Ruby interpreter bug?](https://www.ruby-forum.com/t/ruby-interpreter-bug/147909)

<div class="topic-metadata">

**Author:** [@rpheath](https://www.ruby-forum.com/u/rpheath)\
**Replies:** 4\
**Last updated:** [September 6, 2008, 10:27pm UTC](https://www.ruby-forum.com/t/ruby-interpreter-bug/147909 "2008-09-06T22:27:38Z")

</div>

I get a core dump when executing the following code. class Bob \[‘hi’, ‘hello’, ‘howdy’, ‘goodbye’\].each do |mname| instance\_eval \<\<-EOF def #{mname} puts #{mname} end EOF end end Bob.hi I get the same behavior…

---

## [Ruby 1.9 curses library on windows - detect arrow keys?](https://www.ruby-forum.com/t/ruby-1-9-curses-library-on-windows-detect-arrow-keys/147904)

<div class="topic-metadata">

**Author:** [@richardchaven](https://www.ruby-forum.com/u/richardchaven)\
**Replies:** 0\
**Last updated:** [September 6, 2008, 9:03pm UTC](https://www.ruby-forum.com/t/ruby-1-9-curses-library-on-windows-detect-arrow-keys/147904 "2008-09-06T21:03:18Z")

</div>

I have been using ncurses-ruby with Ruby 1.8 on Windows. Upon upgrading to Ruby 1.9 I discovered that the built-in curses library supports colour etc. so I switched to that (very easy). Unfortunately unlike Ncurses, C…

---

## [TCP Socket Programming](https://www.ruby-forum.com/t/tcp-socket-programming/147887)

<div class="topic-metadata">

**Author:** [@mac20](https://www.ruby-forum.com/u/mac20)\
**Replies:** 2\
**Last updated:** [September 6, 2008, 8:56pm UTC](https://www.ruby-forum.com/t/tcp-socket-programming/147887 "2008-09-06T20:56:38Z")

</div>

Hi I am trying to establish communication between 2 applications. On executing the below piece of code on client side application, I get this error socket\_client.rb:3:in initialize': Bad file descriptor - connect(2) …

---

## [Useless external functions](https://www.ruby-forum.com/t/useless-external-functions/147702)

<div class="topic-metadata">

**Author:** [@SASADA\_Koichi](https://www.ruby-forum.com/u/SASADA_Koichi)\
**Replies:** 4\
**Last updated:** [September 6, 2008, 8:45pm UTC](https://www.ruby-forum.com/t/useless-external-functions/147702 "2008-09-06T20:45:43Z")

</div>

Hi, I counted references of external functions in MRI/trunk. e$B!!e(Bhttp://www.atdot.net/sp/readonly/yr0o6k \[Function name, Reference count, Object file name\] (sorted by refcount, funcname). It will be help for ref…

---

## [Request for Block local methods, and Proc syntax](https://www.ruby-forum.com/t/request-for-block-local-methods-and-proc-syntax/147367)

<div class="topic-metadata">

**Author:** [@lynchnco](https://www.ruby-forum.com/u/lynchnco)\
**Replies:** 19\
**Last updated:** [September 6, 2008, 7:55pm UTC](https://www.ruby-forum.com/t/request-for-block-local-methods-and-proc-syntax/147367 "2008-09-06T19:55:31Z")

</div>

So after using Ruby for a little over two months, I’ve made the complete switch from Java to Ruby and I’m loving it. But I have two features that I would like to add to Ruby if possible. Would you guys be able to tell…

---

## [Attr\_\*, \*variables\_\*](https://www.ruby-forum.com/t/attr-variables/147890)

<div class="topic-metadata">

**Author:** [@pedro-silva](https://www.ruby-forum.com/u/pedro-silva)\
**Replies:** 4\
**Last updated:** [September 6, 2008, 7:53pm UTC](https://www.ruby-forum.com/t/attr-variables/147890 "2008-09-06T19:53:01Z")

</div>

It wouldn’t be nice if all these methods respect a unique arguments form. attr\_\* methods receive a symbol without the @ prefix, but variables methods receive @ prefixed symbols. Even class\_variables or instance\_variab…

---

## [NLize (Native Languageize Ruby's error messages)](https://www.ruby-forum.com/t/nlize-native-languageize-rubys-error-messages/147900)

<div class="topic-metadata">

**Author:** [@arton](https://www.ruby-forum.com/u/arton)\
**Replies:** 0\
**Last updated:** [September 6, 2008, 7:40pm UTC](https://www.ruby-forum.com/t/nlize-native-languageize-rubys-error-messages/147900 "2008-09-06T19:40:44Z")

</div>

Hi all I’ve just released NLize. NLize is an extended library that converts Ruby’s error messages into native language using Ruby-GetText. At this time, it only supports x86 Ruby (I’ve tested on Vista x86 with msvc-…

---

## [\[Bug #505\] 1.upto 2 {|i| p i }](https://www.ruby-forum.com/t/bug-505-1-upto-2-i-p-i/146997)

<div class="topic-metadata">

**Author:** [@Shyouhei\_U](https://www.ruby-forum.com/u/Shyouhei_U)\
**Replies:** 6\
**Last updated:** [September 6, 2008, 6:17pm UTC](https://www.ruby-forum.com/t/bug-505-1-upto-2-i-p-i/146997 "2008-09-06T18:17:32Z")

</div>

Bug #505: 1.upto 2 {|i| p i } http://redmine.ruby-lang.org/issues/show/505 e$B5/I\<\<Te(B: Shyouhei U. e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: High e$BC4Ev\<Te(B: Yukihiro M., e$B%+%F%4%je(B: core e$B$$$D$N$^$K$+e(B1.upt…

---

## [Is it possible to turn a private method into a public one?](https://www.ruby-forum.com/t/is-it-possible-to-turn-a-private-method-into-a-public-one/147841)

<div class="topic-metadata">

**Author:** [@lpc2148](https://www.ruby-forum.com/u/lpc2148)\
**Replies:** 4\
**Last updated:** [September 6, 2008, 5:44pm UTC](https://www.ruby-forum.com/t/is-it-possible-to-turn-a-private-method-into-a-public-one/147841 "2008-09-06T17:44:10Z")

</div>

hey guys ! could a private/protected method be turned into a public one ?

---

## [September Phoenix Ruby User Group Meeting](https://www.ruby-forum.com/t/september-phoenix-ruby-user-group-meeting/147892)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 0\
**Last updated:** [September 6, 2008, 5:43pm UTC](https://www.ruby-forum.com/t/september-phoenix-ruby-user-group-meeting/147892 "2008-09-06T17:43:35Z")

</div>

September Phoenix Ruby U. Group Meeting Date: Monday, September 8, 2008 Time: 6:30 pm Place: Happy Camper Studios 4643 E. Thomas Rd. Suite #3 Phoenix, AZ 85018 UPDATE: We are meeting again at the offices of Hap…

---

## [\[Bug #547\] IPV6$B7O$NDj?t$,L$Dj5A(B](https://www.ruby-forum.com/t/bug-547-ipv6-b7o-ndj-t-l-dj5a-b/147877)

<div class="topic-metadata">

**Author:** [@Motonori\_IWAMURO](https://www.ruby-forum.com/u/Motonori_IWAMURO)\
**Replies:** 2\
**Last updated:** [September 6, 2008, 2:39pm UTC](https://www.ruby-forum.com/t/bug-547-ipv6-b7o-ndj-t-l-dj5a-b/147877 "2008-09-06T14:39:10Z")

</div>

Bug #547: IPV6e$B7O$NDj?t$,L$Dj5Ae(B http://redmine.ruby-lang.org/issues/show/547 e$B5/I\<\<Te(B: Motonori IWAMURO e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal sockete$B$K!"e(BIPPROTO\_IPV6e$B$de(BIPV6\_JOIN\_GROUPe$BEy$N…

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

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