<?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 about="http://blog.gmane.org/gmane.comp.lang.ruby.core">
    <title>gmane.comp.lang.ruby.core</title>
    <link>http://blog.gmane.org/gmane.comp.lang.ruby.core</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://comments.gmane.org/gmane.comp.lang.ruby.core/19584"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.ruby.core/19563"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.ruby.core/19552"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.ruby.core/19548"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.ruby.core/19546"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.ruby.core/19537"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.ruby.core/19525"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.ruby.core/19524"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.ruby.core/19523"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.ruby.core/19512"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.ruby.core/19502"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.ruby.core/19501"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.ruby.core/19500"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.ruby.core/19499"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.ruby.core/19498"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.ruby.core/19487"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.ruby.core/19472"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.ruby.core/19469"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.ruby.core/19442"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.ruby.core/19440"/>
      </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://comments.gmane.org/gmane.comp.lang.ruby.core/19584">
    <title>[ruby-core:20273] Tail recursion?</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.core/19584</link>
    <description>Hi list

I was just having some real fun with the 191p2 and somehow I was sure
that tail recursion would be optimized away, but alas....
I than searched the list for any information on that and did not find anything.
Did I only dream or am I correct in assuming that Ruby1.9 will
eventually optimize tail recursions?

Thx in advance

Cheers
Robert

</description>
    <dc:creator>Robert Dober</dc:creator>
    <dc:date>2008-12-03T21:47:20</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.core/19563">
    <title>[ruby-core:20252] [Bug #816] Unexpected syntax error with: if true and not\n   false</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.core/19563</link>
    <description>Bug #816: Unexpected syntax error with: if true and not\n   false
http://redmine.ruby-lang.org/issues/show/816

Author: Joao Pedrosa
Status: Open, Priority: Normal

ruby -v so.rb
ruby 1.8.7 (2008-11-11 patchlevel 73) [i686-linux]
"yay"


ruby1.9 -v so.rb
ruby 1.9.1 (2008-12-01 revision 20437) [i686-linux]
so.rb:2: syntax error, unexpected '\n'
so.rb:3: warning: unused literal ignored
so.rb:5: syntax error, unexpected keyword_end, expecting $end


cat so.rb

if true and not
  false
  p 'yay'
end


----------------------------------------
http://redmine.ruby-lang.org


</description>
    <dc:creator>Joao Pedrosa</dc:creator>
    <dc:date>2008-12-03T06:32:29</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.core/19552">
    <title>[ruby-core:20241] [Bug #814] NoMethodError: undefined method `read_nonblock' for #&lt;OpenSSL::SSL::SSLSocket:0x1a64f9a0&gt;</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.core/19552</link>
    <description>Bug #814: NoMethodError: undefined method `read_nonblock' for #&lt;OpenSSL::SSL::SSLSocket:0x1a64f9a0&gt;
http://redmine.ruby-lang.org/issues/show/814

Author: Aaron Patterson
Status: Open, Priority: Normal
Category: ext

My patch from #806 broke because OpenSSL::SSL::SSLSocket doesn't implement read_nonblock.

I've attached a patch that implements read_nonblock on OpenSSL::SSL::SSLSocket.

This is a naive patch.


----------------------------------------
http://redmine.ruby-lang.org


</description>
    <dc:creator>Aaron Patterson</dc:creator>
    <dc:date>2008-12-03T04:54:48</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.core/19548">
    <title>[ruby-core:20237] Does this count as a bug in #parameters?</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.core/19548</link>
    <description>irb(main):023:0&gt; -&gt;(c=1+2) {}.parameters
=&gt; [[:opt, :c, 1]]




</description>
    <dc:creator>Dave Thomas</dc:creator>
    <dc:date>2008-12-03T04:30:34</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.core/19546">
    <title>[ruby-core:20235] autoload and concurrency</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.core/19546</link>
    <description>Merb uses autoload rather extensively. We have lately observed some
disturbing behavior around concurrency.
Effectively, because autoload removes the flag before loading the file, if
two threads concurrently attempt to access an autoloaded constant, one of
the threads can get a NameError.

It's easy to reproduce this by adding a sleep to the file being loaded
before the constant is defined, and then spinning up two threads that both
try to use the constant. This is reproducible in MRI; it does not only
happen with JRuby's true parallel execution.

The worst part is that no user action can solve this problem: because
autoloading is magic, it's impossible for the user to lock the resulting
require. In effect, this makes autoloading completely useless for threaded
environments. Is this intentional?

Is there something we can do at the language level to ameliorate this
problem?

</description>
    <dc:creator>Yehuda Katz</dc:creator>
    <dc:date>2008-12-03T04:23:22</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.core/19537">
    <title>[ruby-core:20226] \b and \B with Unicode</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.core/19537</link>
    <description>#encoding: utf-8
p "  ∂og ".match(/\b./u)    # =&gt;  #&lt;MatchData "o"&gt;


I was surprised that \b didn't find the boundary between the space and  
the Unicode ∂ character. Is that correct?


Dave




</description>
    <dc:creator>Dave Thomas</dc:creator>
    <dc:date>2008-12-02T23:46:31</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.core/19525">
    <title>[ruby-core:20214] Proposal: deferred blocks</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.core/19525</link>
    <description>Several people have played around with solutions that use ParseTree or
RubyParser to extract the contents of a lambda and perform certain
operations.
For instance,

Article.select {|a| a.title =~ /Some title/ }

would generate "select * from articles where title ~ 'Some title'"

This requires access to the ParseTree at runtime, which requires converting
a proc to a ParseTree at runtime. I've been toying with the idea of an
explicit language feature, like lisp quoting, that would explicitly pass the
ParseTree to the method called.

Example:

Article.select(defer {|a| a.title =~ /Some title/ })

class Article
  def self.select(sexp)
    # sexp is: s(:defer, s(:lasgn, :a), s(:match3, s(:lit, /Some title/),
s(:call, s(:lvar, :a), :title, s(:arglist))))
  end
end

I understand that this would require a more explicit definition of the parse
tree, but it seems like UnifiedRuby has provided a viable starting point for
that work.

Is this a terrible idea? Has it already been proposed and rejected
innumerable times?

</description>
    <dc:creator>Yehuda Katz</dc:creator>
    <dc:date>2008-12-02T17:36:18</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.core/19524">
    <title>[ruby-core:20213] [Bug #811] Documentation Patch: Preventing XPath Injection attacks</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.core/19524</link>
    <description>Bug #811: Documentation Patch: Preventing XPath Injection attacks
http://redmine.ruby-lang.org/issues/show/811

Author: Ken Bloom
Status: Open, Priority: Low

Here's a patch to rexml/xpath.rb which documents the variables parameter 
in REXML::XPath. I have previously posted this as ruby-core:16626, but it was ignored.
Please apply it to ruby 1.8 and ruby 1.9, to encourage secure coding practices.


--- xpath.rb.old2008-04-24 17:31:51.000000000 -0500
+++ xpath.rb2008-04-24 17:37:38.000000000 -0500
&lt; at &gt;&lt; at &gt; -15,10 +15,15 &lt; at &gt;&lt; at &gt;
 # node matching '*'.
 # namespaces::
 # If supplied, a Hash which defines a namespace mapping.
+# variables::
+#       If supplied, a Hash which maps $variables in the query
+#       to values. This can be used to avoid XPath injection attacks
+#       or to automatically handle escaping string values.
 #
 #  XPath.first( node )
 #  XPath.first( doc, "//b"} )
 #  XPath.first( node, "a/x:b", { "x"=&gt;"http://doofus" } )
+#  XPath.first( node, '/book/publisher/text()=$publisher', {}, {"publisher"=&gt;"O'Reilly"})
     def XPath::first element, path=nil, namespaces=nil, variables={}
       raise "The namespaces argument, if supplied, must be a hash object." unless namespaces.nil? or namespaces.kind_of?(Hash)
       raise "The variables argument, if supplied, must be a hash object." unless variables.kind_of?(Hash)
&lt; at &gt;&lt; at &gt; -38,10 +43,16 &lt; at &gt;&lt; at &gt;
 #   The xpath to search for.  If not supplied or nil, defaults to '*'
 # namespaces::
 # If supplied, a Hash which defines a namespace mapping
+# variables::
+#       If supplied, a Hash which maps $variables in the query
+#       to values. This can be used to avoid XPath injection attacks
+#       or to automatically handle escaping string values.
 #
 #  XPath.each( node ) { |el| ... }
 #  XPath.each( node, '/*[&lt; at &gt;attr='v']' ) { |el| ... }
 #  XPath.each( node, 'ancestor::x' ) { |el| ... }
+#  XPath.each( node, '/book/publisher/text()=$publisher', {}, {"publisher"=&gt;"O'Reilly"}) \
+#    {|el| ... }
 def XPath::each element, path=nil, namespaces=nil, variables={}, &amp;block
       raise "The namespaces argument, if supplied, must be a hash object." unless namespaces.nil? or namespaces.kind_of?(Hash)
       raise "The variables argument, if supplied, must be a hash object." unless variables.kind_of?(Hash)


----------------------------------------
http://redmine.ruby-lang.org


</description>
    <dc:creator>Ken Bloom</dc:creator>
    <dc:date>2008-12-02T15:29:47</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.core/19523">
    <title>[ruby-core:20212] [Bug #808] IO (StringIO) documentation corrections.</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.core/19523</link>
    <description>Bug #808: IO (StringIO) documentation corrections.
http://redmine.ruby-lang.org/issues/show/808

Author: Emiel van de Laar
Status: Open, Priority: Normal
Category: DOC, Target version: 1.9.1

Hello,

I went through io.c and stringio.c and corrected the documentation for a couple of methods (new way of handling strings).

Patch is attached.

Thanks!


----------------------------------------
http://redmine.ruby-lang.org


</description>
    <dc:creator>Emiel van de Laar</dc:creator>
    <dc:date>2008-12-02T13:00:10</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.core/19512">
    <title>[ruby-core:20201] Language list in unicode.org</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.core/19512</link>
    <description>Hi,

Juhapekka Tolvanen has informed me that unicode.org has a list of
Unicode aware languages, which does not include Ruby.

  http://www.unicode.org/resources/programs.html

He suggested to contact Unicode.org, but it might be a task suitable
for a more fluent English speaker than me.  Could any one contact them
in place of me?

Probably contacting place would be:

  http://www.unicode.org/reporting.html


matz.


</description>
    <dc:creator>Yukihiro Matsumoto</dc:creator>
    <dc:date>2008-12-02T06:40:47</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.core/19502">
    <title>[ruby-core:20191] [Bug #806] Net::Protocol#rbuf_fill is slow</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.core/19502</link>
    <description>Bug #806: Net::Protocol#rbuf_fill is slow
http://redmine.ruby-lang.org/issues/show/806

Author: Aaron Patterson
Status: Open, Priority: Normal
Category: lib

Net::Protocol#rbuf_fill is slow.  We can take advantage of io.read_nonblock and IO.select to deal with timeouts.

I've attached a patch.


----------------------------------------
http://redmine.ruby-lang.org


</description>
    <dc:creator>Aaron Patterson</dc:creator>
    <dc:date>2008-12-01T18:22:32</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.core/19501">
    <title>[ruby-core:20190] Behavior: autoload calls rb_require() directly</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.core/19501</link>
    <description>Hi everyone,

While working on some specs, we found out that autoload  
(Kernel#autoload and Module#autoload) internally call rb_require()  
directly to pull the file in. This of course means that if  
Kernel#require has been changed (for instance by rubygems) that the  
changed logic won't be run.

My question is if it's intentional that autoload bypasses  
Kernel#require. If not, autoload should probably use rb_funcall() to  
keep everything consistent.

This obviously also effects Rubinius, as our autoload just calls  
Kernel#require directly.

Thanks!

  - Evan Phoenix


</description>
    <dc:creator>Evan Phoenix</dc:creator>
    <dc:date>2008-12-01T17:54:36</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.core/19500">
    <title>[ruby-core:20189] [Bug #805] Ruby 1.9.1 preview 2 : build failure on OpenSolaris</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.core/19500</link>
    <description>Bug #805: Ruby 1.9.1 preview 2 : build failure on OpenSolaris
http://redmine.ruby-lang.org/issues/show/805

Author: Dae San Hwang
Status: Open, Priority: High

I got the following error while building 1.9.1 preview 2 on OpenSolaris 5.11 snv_98. (1.9.1 preview 1 was built fine on OpenSolaris.)

It was configured with the following:
./configure --build=x86_64-sun-solaris10 --prefix=/usr/local CFLAGS="-m64" LDFLAGS="-m64"

--
compiling curses
make[1]: Entering directory `/usr/local/src/ruby-1.9.1-preview2/ext/curses'
gcc -I. -I../../.ext/include/x86_64-solaris10 -I../.././include -I../.././ext/curses -DRUBY_EXTCONF_H=\"extconf.h\"    -fPIC -m64 -O2 -g -Wall -Wno-parentheses  -o curses.o -c curses.c
curses.c:419:18: macro "ISPRINT" requires 2 arguments, but only 1 given
curses.c: In function `curses_getch':
curses.c:419: error: `ISPRINT' undeclared (first use in this function)
curses.c:419: error: (Each undeclared identifier is reported only once
curses.c:419: error: for each function it appears in.)
curses.c:1113:18: macro "ISPRINT" requires 2 arguments, but only 1 given
curses.c: In function `window_getch':
curses.c:1113: error: `ISPRINT' undeclared (first use in this function)
make[1]: *** [curses.o] Error 1
make[1]: Leaving directory `/usr/local/src/ruby-1.9.1-preview2/ext/curses'
make: *** [exts] Error 1


----------------------------------------
http://redmine.ruby-lang.org


</description>
    <dc:creator>Dae San Hwang</dc:creator>
    <dc:date>2008-12-01T16:50:41</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.core/19499">
    <title>[ruby-core:20188] [Bug #804] Ruby 1.9.1 preview 2 : make test failure</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.core/19499</link>
    <description>Bug #804: Ruby 1.9.1 preview 2 : make test failure
http://redmine.ruby-lang.org/issues/show/804

Author: Philippe Lucas
Status: Open, Priority: Normal

Version built on Fedora core 2 x686 with gcc 4.0.2 in a sub directory (UNIX) of the main ruby source with 
./configure --prefix=/h/phil/DEV/RUBY/ruby-191pv2 --enable-shared --enable-install-doc --enable-pthread --with-mantype=man

./ruby -v  =&gt; ruby 1.9.1 (2008-12-01 revision 20438) [i686-linux]
Note that :
  ruby -v  =&gt; ruby 1.8.7 (2008-05-31 patchlevel 0) [i686-linux]

In the announce message of this release, i read :
== Improvements
* You can "make test" without installing ruby.

So make test gives this error :
test_flip.rb /h/phil/DEV/RUBY/ruby-1.9.1-preview2/UNIX/ruby: error while loading shared libraries: libruby.so.1.9: cannot open shared object file: No such file or directory

which is not very suprising !.

Regards.


----------------------------------------
http://redmine.ruby-lang.org


</description>
    <dc:creator>Philippe Lucas</dc:creator>
    <dc:date>2008-12-01T15:44:35</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.core/19498">
    <title>[ruby-core:20187] [ANN] Ruby 1.9.1 Preview 2 Released</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.core/19498</link>
    <description>Ruby 1.9.1 Preview 2 has been released.

This is a preview release of Ruby 1.9, which will be the first stable
version of Ruby 1.9 series.
If you encounter a bug or a problem, please let us know it via the
official issue tracking system (http://redmine.ruby-lang.org ).

== Location
* ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-preview2.tar.bz2
  SIZE:   6148131 bytes
  MD5:    62126475998ede5318c1bc82c40d5f48
  SHA256: 2c419dc325c6a75fb7b961496c0dd54f2729e6e01730589c4fb06e34ddd7a7cc

* ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-preview2.tar.gz
  SIZE:   7375483 bytes
  MD5:    7699b9e54c53b16640d40a213588e704
  SHA256: dd737d26212d68c26ecb4d6e2ed180a0d7d5e27fb7bd2c819935494daa1cf50b

* ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-preview2.zip
  SIZE:   8612618 bytes
  MD5:    d3ae200280b75801bfc5c090d3592577
  SHA256: 96b6a2745b64f03ffbd5da97f93a2676365e3900cb8f6bf820f47739ef8d3fa9

== Improvements
* supports 21 new character encodings.
* works better with RubyGems.
* handles SEGV better when system stack overflows.
* fixed a bit of regexp imcompatiblity to Perl5 and old Ruby.
* many bugs in Time#strftime and Date#strftime fixed.
* process termination got faster.
* allows long style options in RUBYOPT.
* You can "make test" without installing ruby.
* You can derive a class from Fiber correctly.
* many bugs fixed.

== Release schedule
Current Status:
 * Language features are effectively "frozen".
 * But we could not finish multilingualization tasks for standard
   libraries. For example, irb does not recognize magic comments.
 * So changes to some of standard libraries continue.
   * irb
   * erb
   * cgi
   * ...

Schedule:
 * 25 Dec, 2008: Ruby 1.9.1 release candidate
 * 25 Jan, 2009: Ruby 1.9.1


Thanks
</description>
    <dc:creator>Yugui (Yuki Sonoda</dc:creator>
    <dc:date>2008-12-01T13:25:50</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.core/19487">
    <title>[ruby-core:20176] Unable to build from source on Vista, VC++ 9</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.core/19487</link>
    <description>Hi,

Windows Vista (Home Premium)
MS VC++ 9 (cl 15)
Ruby 1.8.6-p114 and Ruby 1.8.6-p237

eval.c
...
eval.c(9839) : fatal error C1189: #error :  unsupported platform
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 
9.0\VC\BIN\amd64\cl.EXE"' : return code '0x2
'
Stop.

Where the relevant code is:

#if !defined SAVE_WIN32_EXCEPTION_LIST &amp;&amp; !defined _WIN32_WCE
# error unsupported platform
#endif
#endif

Regards,

Dan


</description>
    <dc:creator>Daniel Berger</dc:creator>
    <dc:date>2008-11-30T13:42:36</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.core/19472">
    <title>[ruby-core:20161] \Z? in regular expression in 1.9.1</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.core/19472</link>
    <description>I noticed that the following reg exp causes syntax error in 1.9.1 (I  
use tip of the branch):

/\n(\.\/)?(.*spec\.rb):[\d]+:\Z?/

To reproduce, just fire up irb of 1.9.1 and try to assign this literal  
to some variable.

The problem is with ? quantifier following \Z. I could not find any  
information about this
restriction on the web and have no Mastering regular expressions book  
at hand.

Could someone shed some light on whether it is 1.9.1 engine  
restriction, general regular expressions
restriction or possible 1.9.1 bug?

Just in case: this regexp comes from autospec in RSpec.

Thank you,

MK


</description>
    <dc:creator>Michael Klishin</dc:creator>
    <dc:date>2008-11-28T23:14:36</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.core/19469">
    <title>[ruby-core:20158] [Bug #800] Problem with Array class</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.core/19469</link>
    <description>Bug #800: Problem with Array class
http://redmine.ruby-lang.org/issues/show/800

Author: Francois Proulx
Status: Open, Priority: High

If you test this simple program, you will see why array should be dup on assignment ...

   a=1
   b=1
   c=[a,b]
  
   def foo(x)
     x[0] +=1
     x[1] +=1
   end

   d = c
   e = d
   f = e
 
   foo(f)

   p c[0],c[1]


----------------------------------------
http://redmine.ruby-lang.org


</description>
    <dc:creator>Francois Proulx</dc:creator>
    <dc:date>2008-11-28T20:34:20</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.core/19442">
    <title>[ruby-core:20131] [Bug #799] cross compile 1.9.1-preview1 is not possible</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.core/19442</link>
    <description>Bug #799: cross compile 1.9.1-preview1 is not possible
http://redmine.ruby-lang.org/issues/show/799

Author: Luis Lavena
Status: Open, Priority: Normal
Target version: 1.9.1

Hello everybody.

I tried to cross compile 1.9.1-preview1 under ubuntu. It succeeded with 1.8.6-p287 and p114 but failed with 1.9.

Used the following compile flags:
&lt;pre&gt;&lt;code&gt;--host=i586-mingw32msvc --target=i386-mingw32 --build=i686-linux --enable-shared&lt;/code&gt;&lt;/pre&gt;

This is the snipped of the output

&lt;pre&gt;&lt;code&gt;make[1]: Leaving directory `/home/luislavena/sources/cross-ruby/builds/ruby-1.9.1-preview1'
make -f enc.mk RUBY="ruby -I/home/luislavena/sources/cross-ruby/builds/ruby-1.9.1-preview1 -rfake " MINIRUBY="ruby -I/home/luislavena/sources/cross-ruby/builds/ruby-1.9.1-preview1 -rfake "  encs
make[1]: Entering directory `/home/luislavena/sources/cross-ruby/builds/ruby-1.9.1-preview1'
mkdir -p .ext/i386-mingw32/enc .ext/i386-mingw32/enc/trans enc enc/trans
make[1]: Leaving directory `/home/luislavena/sources/cross-ruby/builds/ruby-1.9.1-preview1'
/home/luislavena/sources/cross-ruby/sources/ruby-1.9.1-preview1/ext/extmk.rb:338: undefined method `&lt;&lt;' for nil:NilClass (NoMethodError)
make: *** [exts] Error 1
&lt;/code&gt;&lt;/pre&gt;

Attached is the complete output of my rake script.


----------------------------------------
http://redmine.ruby-lang.org


</description>
    <dc:creator>Luis Lavena</dc:creator>
    <dc:date>2008-11-26T21:57:39</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.core/19440">
    <title>[ruby-core:20129] Ruby class variable access from C</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.core/19440</link>
    <description>I'm probably missing something trivial, but given the following Ruby code:

class Myclass
  &lt; at &gt;&lt; at &gt;myvar = 1

  def self.myvar
    return &lt; at &gt;&lt; at &gt;myvar
  end
end

I can access &lt; at &gt;&lt; at &gt;myvar from Ruby with Myclass::myvar.

Great, but now I need to access that same variable through a C
extension.  I think I can get it by doing:
VALUE myvar = rb_eval_string("Myclass::myvar");
but surely there's a better way?  I'm thinking something like
rb_cvar_get() but that requires that I pass in a VALUE and all I have is
a string at this point, "Myclass".



</description>
    <dc:creator>Christopher Thompson</dc:creator>
    <dc:date>2008-11-26T19:49:32</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.core/19436">
    <title>[ruby-core:20125] Playing with String#bytes</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.core/19436</link>
    <description>Hello ruby-core,

Today I was playing around with manipulating strings containing
binary data, i.e. "\xaa\xab\xac\xad\xae" and using the new String
methods available in Ruby 1.9.

The exercise I was trying out was to extract out a range of bytes as
Fixnums. Kind of like String#bytes but I was only interested in a
subarray. Like so:

"\xaa\xab\xac\xad\xae".bytes.to_a[1,3] # =&gt; [171, 172, 173]

This works but operates on the entire data set which I imagine is
fairly expensive... So I chopped it up before hand like so:

"\xaa\xab\xac\xad\xae"[1,3].bytes.to_a
=&gt; [171, 172, 173]

Much better. This works fine when using the ASCII-8BIT encoding.
As soon as you use something like UTF-8 it fails because the []
method now works on characters instead of bytes.

data = "\xc3\xa9\xc3\xa9" # =&gt; "\xC3\xA9\xC3\xA9"
data.force_encoding("utf-8") # =&gt; ""
data[0,2].bytes.to_a  # =&gt; [195, 169, 195, 169]

Here I get four bytes instead of the first two which I wanted.

data.bytes.to_a[0,2] # =&gt; [195, 169]

So having said that I must ensure that the binary data I am working
with is encoded using ASCII-8BIT. This is off course completely
reasonable and recommended.

Anyway, my real comment is that it might be nice to have String#getbyte
or String#bytes be able to get a subset of bytes from the string.
For example:

"abcde".bytes(1,3).to_a # =&gt; [98, 99, 100]
"abcde".bytes(1..3).to_a # =&gt; [98, 99, 100]
"abcde".bytes(-2,2).to_a # =&gt; [100, 101]

"abcde".getbyte(1,3) # =&gt; [98, 99, 100]
"abcde".getbyte(1..3) # =&gt; [98, 99, 100]
"abcde".getbyte(-2,2) # =&gt; [100, 101]

String#getbyte is singular as opposed to plurar which doesn't sit
well with me.

Thanks for reading!

 - Emiel van de Laar


lar as opposed to </description>
    <dc:creator>Emiel van de Laar</dc:creator>
    <dc:date>2008-11-26T16:07:08</dc:date>
  </item>
  <textinput about="http://search.gmane.org/?group=$group=gmane.comp.lang.ruby.core">
    <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.core</link>
  </textinput>
</rdf:RDF>
