<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://permalink.gmane.org/gmane.comp.lang.ruby.general">
    <title>gmane.comp.lang.ruby.general</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.ruby.general</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352764"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352763"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352762"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352761"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352760"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352759"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352758"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352757"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352756"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352755"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352754"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352753"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352752"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352751"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352750"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352749"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352748"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352747"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352746"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352745"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352764">
    <title>Re: Methods as arguments?</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.ruby.general/352764</link>
    <description>&lt;pre&gt;In method call you can omit parenthnes. So this is equivalent to

 def world()
   print('world!')
 end
 
 def aaa (string, method)
   print(string)
 end
 
 aaa ('hello', world())

On Fri, May 18, 2012 at 05:10:14PM +0900, Robinson Risquez wrote:

&lt;/pre&gt;</description>
    <dc:creator>Ondřej Bílka</dc:creator>
    <dc:date>2012-05-18T11:38:36</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352763">
    <title>Re: reading from and writing to a Unicode encoded file</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.ruby.general/352763</link>
    <description>&lt;pre&gt;Regis d'Aubarede wrote in post #1061277:

Thank you very much, works like a charm. I've replaced the actual 
filename with a variable, so I can use ARGV.

kind regards,
seba

&lt;/pre&gt;</description>
    <dc:creator>Sebastjan H.</dc:creator>
    <dc:date>2012-05-18T11:31:12</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352762">
    <title>Re: reading from and writing to a Unicode encoded file</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.ruby.general/352762</link>
    <description>&lt;pre&gt;Sebastjan H. wrote in post #1061276:



data=nil
open("data.txt", "rb:UTF-16LE") {|fin| data=fin.read() }
open("data.txt", "wb:UTF-8")  { |fout| fout.write(data) } if data

&lt;/pre&gt;</description>
    <dc:creator>Regis d'Aubarede</dc:creator>
    <dc:date>2012-05-18T11:06:26</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352761">
    <title>Re: reading from and writing to a Unicode encoded file</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.ruby.general/352761</link>
    <description>&lt;pre&gt;Regis d'Aubarede wrote in post #1061272:

thx, it works for me too, however, I wanted to include it in the script 
refered to above, so I tried this modification according to your modell:
--------------------------------------
file = ARGV[0]

File.open(file, "Unicode") {|fin|
  File.open(file, "wb:UTF-8") { |fout|
    fout.write(fin.read())
  }
}
--------------------------------------

and I get an error.

If possible, I want to run this file conversion prior to my other code, 
but the file should be named the same and the content untouched. I know 
that my version above would overwrite it.

Something like this:
1. Convert the file.
2. Reopen the file.
3. Read the content.
4. Run some code on the content.
5. Write something back to the file.

No. 1 is giving me the headache, the rest is in place:)

regards,
seba

&lt;/pre&gt;</description>
    <dc:creator>Sebastjan H.</dc:creator>
    <dc:date>2012-05-18T10:55:55</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352760">
    <title>Re: reading from and writing to a Unicode encoded file</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.ruby.general/352760</link>
    <description>&lt;pre&gt;Am 18.05.2012 11:22, schrieb Vimal Selvam:

Iconv is deprecated and will be removed. Ruby has built-in encoding
facilities, namely String#encode.


Vale,
Marvin


&lt;/pre&gt;</description>
    <dc:creator>Quintus</dc:creator>
    <dc:date>2012-05-18T10:51:55</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352759">
    <title>Re: problem installing TkRuby on ubuntu 12.04</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.ruby.general/352759</link>
    <description>&lt;pre&gt;Hidetoshi NAGAI wrote in post #1061251:

I think my ruby1.9.1 library is at /usr/lib/ruby/1.9.1/x86_64linux 
(correct me if I am wrong here)

This was the result when I used ldd:

linux-vdso.so.1 =&amp;gt;  (0x00007fff4746d000)
  libruby-1.9.1.so.1.9 =&amp;gt; /usr/lib/libruby-1.9.1.so.1.9
(0x00007f10edb99000)
  libtcl8.5.so.0 =&amp;gt; /usr/lib/libtcl8.5.so.0 (0x00007f10ed880000)
  libm.so.6 =&amp;gt; /lib/x86_64-linux-gnu/libm.so.6 (0x00007f10ed585000)
  libX11.so.6 =&amp;gt; /usr/lib/x86_64-linux-gnu/libX11.so.6
(0x00007f10ed251000)
  libXss.so.1 =&amp;gt; /usr/lib/x86_64-linux-gnu/libXss.so.1
(0x00007f10ed04d000)
  libXft.so.2 =&amp;gt; /usr/lib/x86_64-linux-gnu/libXft.so.2
(0x00007f10ece37000)
  libfontconfig.so.1 =&amp;gt; /usr/lib/x86_64-linux-gnu/libfontconfig.so.1
(0x00007f10ecc01000)
  libc.so.6 =&amp;gt; /lib/x86_64-linux-gnu/libc.so.6 (0x00007f10ec844000)
  libpthread.so.0 =&amp;gt; /lib/x86_64-linux-gnu/libpthread.so.0
(0x00007f10ec626000)
  librt.so.1 =&amp;gt; /lib/x86_64-linux-gnu/librt.so.1 (0x00007f10ec41e000)
  libdl.so.2 =&amp;gt; /lib/x86_64-linux-gnu/libdl.so.2 (0x0000&lt;/pre&gt;</description>
    <dc:creator>Bharadwaj Srigiriraju</dc:creator>
    <dc:date>2012-05-18T10:48:05</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352758">
    <title>Re: reading from and writing to a Unicode encoded file</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.ruby.general/352758</link>
    <description>&lt;pre&gt;Hello,
tested on windows:

open("data.txt", "rb:UTF-16LE") {|fin|
  open("odata.txt", "wb:UTF-8") { |fout|
    fout.write(fin.read())
  }
}

bye

&lt;/pre&gt;</description>
    <dc:creator>Regis d'Aubarede</dc:creator>
    <dc:date>2012-05-18T10:14:25</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352757">
    <title>Re: reading from and writing to a Unicode encoded file</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.ruby.general/352757</link>
    <description>&lt;pre&gt;Hi Sebastjan H,

You can use Iconv standard library of Ruby (Method Name: conv) which
help you to convert the unicode of the string or file.

Please refer:
http://ruby-doc.org/stdlib-1.9.2/libdoc/iconv/rdoc/Iconv.html#method-c-conv

Regards,
Vimal Raj

&lt;/pre&gt;</description>
    <dc:creator>Vimal Selvam</dc:creator>
    <dc:date>2012-05-18T09:22:13</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352756">
    <title>Re: ispunity Little probs</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.ruby.general/352756</link>
    <description>&lt;pre&gt;
Hi Ajith,

Great to know that you are now able to install it properly.
once ispunity is installed and json file is configured.

You need to run
     "ispunity setup"

this will setup the application and it should be the first command to be 
run for the application to work properly. then "ispunity monitor" needs 
to be run as a cron job ideally every 5 min for dead gateway detection 
and failover. We'll be releasing a new version and updating the 
documentation with these details this weekend.

to check whether all the connections are working or not follow the link 
http://www.ispunity.com/hw_to.html

remember to check your route

" ip route show "

if both your net connections are working then it should have 2 gateways.

&lt;/pre&gt;</description>
    <dc:creator>Arun Tomar</dc:creator>
    <dc:date>2012-05-18T08:33:30</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352755">
    <title>Re: reading from and writing to a Unicode encoded file</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.ruby.general/352755</link>
    <description>&lt;pre&gt;Sebastjan H. wrote in post #1061256:

I refer to this post: http://www.ruby-forum.com/topic/4191662#new

regards,
seba

&lt;/pre&gt;</description>
    <dc:creator>Sebastjan H.</dc:creator>
    <dc:date>2012-05-18T08:19:40</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352754">
    <title>Re: ispunity Little probs</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.ruby.general/352754</link>
    <description>&lt;pre&gt;Arun Tomar wrote in post #1060652:



  I had done what u said and found system was using 1.8.7 and i
uninstalled it from synaptic and re installed thru rvm, and now it is
working.
Now i have another problem, I am using an MTS dongle and my mobile as
modem &amp;amp;  ispunity is not giving any result. i am attaching a screenshot
and attaching my config file. pls help. thanks.

Attachments:
http://www.ruby-forum.com/attachment/7402/ispnew.jpg
http://www.ruby-forum.com/attachment/7403/Screenshot_from_2012-05-18_13_37_50.jpg
http://www.ruby-forum.com/attachment/7404/ispunity.json


&lt;/pre&gt;</description>
    <dc:creator>Ajith N.</dc:creator>
    <dc:date>2012-05-18T08:18:39</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352753">
    <title>Re: Methods as arguments?</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.ruby.general/352753</link>
    <description>&lt;pre&gt;there are two ways:

pass it as symbol:

aaa ('hello', :world)

or pass it as method object

aaa ('hello', method(:world))


depend on what you want todo

&lt;/pre&gt;</description>
    <dc:creator>Hans Mackowiak</dc:creator>
    <dc:date>2012-05-18T08:12:56</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352752">
    <title>Methods as arguments?</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.ruby.general/352752</link>
    <description>&lt;pre&gt;Hi, I was experimenting with the arguments of the methods and I have a
question:

As I can pass a method as an argument to another method?, For example:


def world
  print 'world!'
end

def aaa (string, method)
  print string
end

aaa ('hello', world)


When I invoke aaa, the method world should not be invoked because I'm
just passing it as argument and and neither I invoke this in the method
aaa, and yet it invokes!. Why is this?.

I welcome your support!. Sorry for bad english :)

&lt;/pre&gt;</description>
    <dc:creator>Robinson Risquez</dc:creator>
    <dc:date>2012-05-18T08:10:14</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352751">
    <title>Re: A million reasons why Encoding was a mistake</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.ruby.general/352751</link>
    <description>&lt;pre&gt;

I think you are being unfair: 1.9 has to deal with the history and
actually 1.8's was broken because of its weak i18n support.  1.9 tries
to evolve from that basis.  If I set encodings properly on streams and
$stdin, $stderr and $stdout things work just fine.

Also, if 1.9 was really that broken we would be seeing much more
postings with encoding issues here.  But apparently most people get by
with 1.9 pretty well which I would take as data point indicating that
it cannot be completely broken as you suggest.

You can even ignore the fact that internally String stores data as
bytes.  For many applications this is just an implementation detail of
String.  The encoding is typically not dynamic because one normally
does not use #force_encoding which will simply unconditionally
overwrite the encoding.


Well, that's just lacking completeness in a feature - you could also
call it a "bug".  But that is something different than "broken
philosophy".


I get by pretty well with the current situation.  There's also w&lt;/pre&gt;</description>
    <dc:creator>Robert Klemme</dc:creator>
    <dc:date>2012-05-18T08:02:02</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352750">
    <title>reading from and writing to a Unicode encoded file</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.ruby.general/352750</link>
    <description>&lt;pre&gt;Hi,

I made a script to read from a Unicode encoded file and also to write
something back. The problem is that the stuff that gets written back is
turned into jibberish.

Is there any way of solving this other than manually changing the coding
of the file to UTF-8?

thank you
regards,
seba

&lt;/pre&gt;</description>
    <dc:creator>Sebastjan H.</dc:creator>
    <dc:date>2012-05-18T07:48:26</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352749">
    <title>Re: rb_gc_register_address() or rb_gc_mark()?</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.ruby.general/352749</link>
    <description>&lt;pre&gt;Eric Hodel wrote in post #1061208:



no its correct i want the control when the GC gets the object or not.
thats why i use a hash, when my binding removes the object out of the 
hash, GC deleteds it. but no earlier

&lt;/pre&gt;</description>
    <dc:creator>Hans Mackowiak</dc:creator>
    <dc:date>2012-05-18T07:20:43</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352748">
    <title>Re: array of strings - finding letter combinations</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.ruby.general/352748</link>
    <description>&lt;pre&gt;botp wrote in post #1061230:

I know it looks odd, but as I understand each IF block has to have an 
END and it seems to me this is the only way the script works.

But since I am new to this I posted here so maybe someone will find 
errors I made.

regards,
seba

&lt;/pre&gt;</description>
    <dc:creator>Sebastjan H.</dc:creator>
    <dc:date>2012-05-18T07:01:57</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352747">
    <title>Re: problem installing TkRuby on ubuntu 12.04</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.ruby.general/352747</link>
    <description>&lt;pre&gt;From: Bharadwaj Srigiriraju &amp;lt;lists&amp;lt; at &amp;gt;ruby-forum.com&amp;gt;
Subject: Re: problem installing TkRuby on ubuntu 12.04
Date: Fri, 18 May 2012 03:19:15 +0900
Message-ID: &amp;lt;e622e33b38f7abc7e1b1e3ca0263069c&amp;lt; at &amp;gt;ruby-forum.com&amp;gt;

Hmmm... Well, it may be a bug on "ext/tk/extconf.rb".
Could you tell me the result of "ldd (your_ruby191_lib_dir)/tcltklib.so"?


It should be possible.
Current Ruby/Tk cannot support Tcl/Tk8.6 (a new command of Tcl8.6 breaks
a call stack which includes Ruby's method call), but must work with 8.5.

Could you rebuild libtcltk-ruby1.9.1 package with Tcl/Tk8.5.11 libraries?
And, if you can, send me "ext/tk/mkmf.log" and "ext/tk/Makefile"?
Probably, the rebuilded package will work properly.
&lt;/pre&gt;</description>
    <dc:creator>Hidetoshi NAGAI</dc:creator>
    <dc:date>2012-05-18T06:54:37</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352746">
    <title>Re: what is going wrong here? The case of the noob not understanding initialize</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.ruby.general/352746</link>
    <description>&lt;pre&gt;
Oops, yes, you're right, I should have tested it. Ignore my mail.

martin


&lt;/pre&gt;</description>
    <dc:creator>Martin DeMello</dc:creator>
    <dc:date>2012-05-18T03:51:46</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352745">
    <title>Re: what is going wrong here? The case of the noob not understanding initialize</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.ruby.general/352745</link>
    <description>&lt;pre&gt;Martin DeMello wrote in post #1061234:

That's not true (at least not in Ruby 1.9). The "if" modifier has lower 
precedence then the "and", so the expression is parsed as expected:

(passed_dictionary_test = false and break) if ...

However, you're right about the "and": Since the left operand is always 
false, the "break" will never be executed.

So you shouldn't read the "and" as "do this and then that". It rather 
means "do this, and if you were successful, do that".




Have to tested it yourself? If you were right, then "passed" would 
always be false. But it's only after x has become 5.

&lt;/pre&gt;</description>
    <dc:creator>Jan E.</dc:creator>
    <dc:date>2012-05-18T03:39:55</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.ruby.general/352744">
    <title>Re: what is going wrong here? The case of the noob not understanding initialize</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.ruby.general/352744</link>
    <description>&lt;pre&gt;This looks good. :-)

Since you already said that the character tests follow the same pattern, 
you might wanna think about writing only one generalized method. For 
example, you could put the character sets and the corresponding "scores" 
in an array and then let a method iterate over it. You don't even have 
to write the actual characters down but use regular expressions instead:

/\p{Lower}/

This regular expression matches any string with a lower case letter (of 
any language) in it. If you only want the latin letters from a to z, you 
can instead use the pattern

/[a-z]/

This narrows the test down to one line: password =~ pattern

As a complete example:


#------------------------------------------
class Entropy

  # the scores are just made up
  CHARACTER_SCORES = {
    # special characters
    # = printable ASCII characters which are not alphanumeric
    /[\p{ASCII}&amp;amp;&amp;amp;\p{Graph}&amp;amp;&amp;amp;\p{^Alnum}]/ =&amp;gt; 11,
    # uppercase letters
    /[A-Z]/ =&amp;gt; 22,
    # lowercase letter
    /[a-z]/ =&amp;gt; 33,
    # digits
    /[&lt;/pre&gt;</description>
    <dc:creator>Jan E.</dc:creator>
    <dc:date>2012-05-18T03:20:50</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.lang.ruby.general">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.lang.ruby.general</link>
  </textinput>
</rdf:RDF>

