Run Paint Run Run | 5 Jul 00:56
Favicon

[ruby-core:24141] [Bug #1725] [PATCH] Warnings with Minor Grammatical Errors

Bug #1725: [PATCH] Warnings with Minor Grammatical Errors
http://redmine.ruby-lang.org/issues/show/1725

Author: Run Paint Run Run
Status: Open, Priority: Low
Category: core
ruby -v: ruby 1.9.2dev (2009-07-03 trunk 23948) [i686-linux]

The attached patch fixes some terribly minor grammatical errors in warnings issued by vm_method.c.

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

Volkmar Schulz | 5 Jul 00:09
Favicon

[ruby-core:24140] [Feature #1724] Support for "&*uml;"-HTML-codes in ERB::Util.html_escape (solution included)

Feature #1724: Support for "&*uml;"-HTML-codes in ERB::Util.html_escape (solution included)
http://redmine.ruby-lang.org/issues/show/1724

Author: Volkmar Schulz
Status: Open, Priority: Normal

Certain language specific chars like the german "Umlaute" are represented in HTML with "ä" (ä),
"ü" (ü) etc.
Since ERB::Util.html_escape escapes the & to become "&" one cannot use these HTML codes.

To work around this problem I modified ERB::Util.html_escape like this:

    def html_escape(s)
      s.to_s.gsub(/&(?!.uml)/, "&amp;").gsub(/\"/, "&quot;").gsub(/>/, "&gt;").gsub(/</, "&lt;")
    end

The modification is in the first call of gsub where I added the condition (?!.uml).
it forces the function to ignore the "&" if it is followed by a pattern that indicates one of the
aforementiond HTML-codes.

I consider this being a safe modification.

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

Victor Shepelev | 4 Jul 23:56
Favicon

[ruby-core:24139] [Bug #1723] respond_to? vs. to_ary

Bug #1723: respond_to? vs. to_ary
http://redmine.ruby-lang.org/issues/show/1723

Author: Victor Shepelev
Status: Open, Priority: Normal
ruby -v: ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-mswin32_71]

# class with respond_to? redefined
class A
   def respond_to?(m); false end
end

x = [A.new]

# deconstructing iteration
x.each do |a, b| p [a,b] end

It outputs [nil, nil], while [#<A:0xb5c9d0>, nil] is expected. If I comment out respond_to? in A, all works
as expected

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

Kirk Haines | 3 Jul 23:41

[ruby-core:24132] 1.8.6 segfault & fix

We've been seeing a number of reports of segfaults with 1.8.6 when
people upgraded from pl287 to pl369.  I, unfortunately, don't have a
simple test case that exposes the segfault, but I did have access to
some code that would dependably cause it.  I traced the source of the
segfault to gc.c.  Specifically, in run_final:

    if (BUILTIN_TYPE(obj) == T_DEFERRED && RDATA(obj)->dfree) {
        (*RDATA(obj)->dfree)(DATA_PTR(obj));
    }

By changing the if line to this:

    if (BUILTIN_TYPE(obj) == T_DEFERRED && RDATA(obj)->dfree && DATA_PTR(obj)) {
        (*RDATA(obj)->dfree)(DATA_PTR(obj));
    }

The segmentation faults go away.

Even considering the current lack of a simple test case that
demonstrates the segfault, does anyone have any speculation regarding
what may be the underlying reason why DATA_PTR(obj) could sometimes be
null before run_final gets called?

Thanks,

Kirk Haines

Run Paint Run Run | 3 Jul 17:21
Favicon

[ruby-core:24127] [Bug #1722] Curried Lambda Returns False for #lambda? Despite Having No "Tricks"

Bug #1722: Curried Lambda Returns False for #lambda? Despite Having No "Tricks"
http://redmine.ruby-lang.org/issues/show/1722

Author: Run Paint Run Run
Status: Open, Priority: Low
Category: core
ruby -v: ruby 1.9.2dev (2009-07-03 trunk 23948) [i686-linux]

A curried lambda returns false for #lambda? despite having identical "rigid" argument handling.

    >> l = lambda {|x|}
    => #<Proc:0x9914b60@(irb):33 (lambda)>
    >> l.call(1,2)
    ArgumentError: wrong number of arguments (2 for 1)
	from (irb):34:in `call'
	from (irb):34
	from /usr/local/bin/irb:12:in `<main>'
   >> l.lambda?
   => true
   >> l.curry.lambda?
   => false
   >> l.curry[1,2]
   ArgumentError: wrong number of arguments (2 for 1)
	from (irb):37:in `[]'
	from (irb):37
	from /usr/local/bin/irb:12:in `<main>'

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

(Continue reading)

Yugui (Yuki Sonoda | 3 Jul 12:27
Favicon
Gravatar

[ruby-core:24124] [ANN] Ruby developer's meeting at Tokyo

Hi,

Ruby developer's meeting will be held at Akihabara, Tokyo.
Everyone who has a topic on developing Ruby implementation is welcome.

Date: 2009-07-16 13:00 JST -
Place: Univ. of Tokyo, Akihabara, Tokyo, Japan.
       (Akihabara-Daibiru bldg. 13F)

Please write your topic and your name in the following wiki page before
visiting.
  http://redmine.ruby-lang.org/wiki/ruby/DevelopersMeeting20090716

thanks,
-- Yugui (Yuki Sonoda)  <yugui <at> yugui.jp>

James Britt | 2 Jul 23:05
Favicon

[ruby-core:24121] [Bug #1718] RDoc directive in lib/yaml/tags.rb prevents rdoc'ing of Module

Bug #1718: RDoc directive in lib/yaml/tags.rb prevents rdoc'ing of Module
http://redmine.ruby-lang.org/issues/show/1718

Author: James Britt
Status: Open, Priority: Normal
ruby -v: ruby 1.8.6 (2009-03-27 patchlevel 367) [i686-darwin9.7.0]

This appears to be a regression.    There is a :stopdoc: directive in lib/yaml/tags.rb  that modifies Module.  

When running rdoc over the Ruby  source tree, this stops the rdoc'ing of the entire Module code; no docs page
for Module is created.

This was a problem once before, and was fixed (I submitted a patch, which was accepted), but now seems to have
returned.  Removing that rdoc directive allows for Module to be doc'ed (though there is still the larger
issue of RDoc pollution with Yaml methods now appearing as part of Module in the resulting RDoc files).

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

Muhammad Ali | 2 Jul 22:35
Favicon

[ruby-core:24120] [Bug #1717] Thread local variables not visible from within a Fiber

Bug #1717: Thread local variables not visible from within a Fiber
http://redmine.ruby-lang.org/issues/show/1717

Author: Muhammad Ali
Status: Open, Priority: Normal
Category: core
ruby -v: ruby 1.9.1p129 (2009-05-12 revision 23412) [i686-linux]

# Given the following:

Thread.current[:x] = 1

Fiber.new{Thread.current[:x]}.resume # => nil

# returns nil when it should return 1 
# even though Thread.current returns the same object

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

Jedediah Smith | 2 Jul 19:10
Favicon

[ruby-core:24118] [Bug #1716] set_trace_func/raise related segfault, one line repro

Bug #1716: set_trace_func/raise related segfault, one line repro
http://redmine.ruby-lang.org/issues/show/1716

Author: Jedediah Smith
Status: Open, Priority: Normal
Category: core
ruby -v: ruby 1.9.1p129 (2009-05-12 revision 23412) [x86_64-linux]

ruby -e 'set_trace_func proc{ begin; fail; rescue; end }; begin; fail; rescue; end'

-e: [BUG] Segmentation fault
ruby 1.9.1p129 (2009-05-12 revision 23412) [x86_64-linux]

-- control frame ----------
c:0004 p:0020 s:0009 b:0009 l:002588 d:000c70 BLOCK 
c:0003 p:0029 s:0006 b:0006 l:002588 d:002288 EVAL   -e:1
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:002588 d:002588 TOP   
---------------------------
-- Ruby level backtrace information-----------------------------------------
-e:0:in `rescue in <main>'
-e:1:in `<main>'

-- C level backtrace information -------------------------------------------
0x7f6cc07d632b /usr/local/lib/libruby.so.1.9(rb_vm_bugreport+0x4b) [0x7f6cc07d632b]
0x7f6cc06f72be /usr/local/lib/libruby.so.1.9 [0x7f6cc06f72be]
0x7f6cc06f7433 /usr/local/lib/libruby.so.1.9(rb_bug+0xb3) [0x7f6cc06f7433]
0x7f6cc077e29c /usr/local/lib/libruby.so.1.9 [0x7f6cc077e29c]
0x7f6cc0498080 /lib/libpthread.so.0 [0x7f6cc0498080]
0x7f6cc07cbbb7 /usr/local/lib/libruby.so.1.9 [0x7f6cc07cbbb7]
(Continue reading)

Run Paint Run Run | 2 Jul 17:23
Favicon

[ruby-core:24116] [Bug #1715] Numeric#arg for NaN is Inconsistent Across Versions

Bug #1715: Numeric#arg for NaN is Inconsistent Across Versions
http://redmine.ruby-lang.org/issues/show/1715

Author: Run Paint Run Run
Status: Open, Priority: Low
ruby -v: ruby 1.9.2dev (2009-07-01 trunk 23924) [i686-linux]

Numeric#arg gives 0 for NaN on 1.9; Pi for NaN on 1.8:

   $ ruby -v -rcomplex -e 'p (0/0.0).arg'
   ruby 1.9.2dev (2009-07-01 trunk 23924) [i686-linux]
   -e:1: warning: (...) interpreted as grouped expression
   0

   $ ruby -v -e 'p (0/0.0).arg'
   ruby 1.9.2dev (2009-07-01 trunk 23924) [i686-linux]
   -e:1: warning: (...) interpreted as grouped expression
   0

   $ ruby8 -v -rcomplex -e 'p (0/0.0).arg'
   ruby 1.8.8dev (2009-07-01) [i686-linux]
   -e:1: warning: (...) interpreted as grouped expression
   3.14159265358979

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

Kazuhiro NISHIYAMA | 2 Jul 13:20
Favicon

[ruby-core:24115] [Bug #1714] make test-all failed

Bug #1714: make test-all failed
http://redmine.ruby-lang.org/issues/show/1714

Author: Kazuhiro NISHIYAMA
Status: Open, Priority: Normal
ruby -v: ruby 1.8.8dev (2009-07-01 revision 23923) [i686-linux]

`make test-all` failed in lib/test/unit/collector/dir.rb.

./miniruby -I/home/kazu/wc/ruby/branches/ruby_1_8/lib -I.ext/common -I./-
-r/home/kazu/wc/ruby/branches/ruby_1_8/ext/purelib.rb 
/home/kazu/wc/ruby/branches/ruby_1_8/runruby.rb --extout=.ext  --
"/home/kazu/wc/ruby/branches/ruby_1_8/test/runner.rb"
--basedir="/home/kazu/wc/ruby/branches/ruby_1_8/test" --runner=console -v
/home/kazu/wc/ruby/branches/ruby_1_8/lib/webrick/ssl.rb:13: uninitialized constant
WEBrick::Config::General (NameError)
	from /home/kazu/wc/ruby/branches/ruby_1_8/lib/webrick/https.rb:11:in `require'
	from /home/kazu/wc/ruby/branches/ruby_1_8/lib/webrick/https.rb:11
	from /home/kazu/wc/ruby/branches/ruby_1_8/test/webrick/utils.rb:10:in `require'
	from /home/kazu/wc/ruby/branches/ruby_1_8/test/webrick/utils.rb:10
	from /home/kazu/wc/ruby/branches/ruby_1_8/lib/webrick/config.rb:14:in `require'
	from /home/kazu/wc/ruby/branches/ruby_1_8/lib/webrick/config.rb:14
	from /home/kazu/wc/ruby/branches/ruby_1_8/lib/webrick.rb:14:in `require'
	from /home/kazu/wc/ruby/branches/ruby_1_8/lib/webrick.rb:14
	from /home/kazu/wc/ruby/branches/ruby_1_8/lib/soap/rpc/httpserver.rb:12:in `require'
	from /home/kazu/wc/ruby/branches/ruby_1_8/lib/soap/rpc/httpserver.rb:12
	from /home/kazu/wc/ruby/branches/ruby_1_8/lib/soap/rpc/standaloneServer.rb:9:in `require'
	from /home/kazu/wc/ruby/branches/ruby_1_8/lib/soap/rpc/standaloneServer.rb:9
	from /home/kazu/wc/ruby/branches/ruby_1_8/test/wsdl/raa/RAAService.rb:4:in `require'
	from /home/kazu/wc/ruby/branches/ruby_1_8/test/wsdl/raa/RAAService.rb:4
(Continue reading)


Gmane