[#35027] [Ruby 1.9-Bug#4352][Open] [patch] Fix eval(s, b) backtrace; make eval(s, b) consistent with eval(s) — "James M. Lawrence" <redmine@...>

Bug #4352: [patch] Fix eval(s, b) backtrace; make eval(s, b) consistent with eval(s)

16 messages 2011/02/01

[#35114] [Ruby 1.9-Bug#4373][Open] http.rb:677: [BUG] Segmentation fault — Christian Fazzini <redmine@...>

Bug #4373: http.rb:677: [BUG] Segmentation fault

59 messages 2011/02/06

[#35171] [Ruby 1.9-Bug#4386][Open] encoding: directive does not affect regex expressions — mathew murphy <redmine@...>

Bug #4386: encoding: directive does not affect regex expressions

9 messages 2011/02/09

[#35237] [Ruby 1.9-Bug#4400][Open] nested at_exit hooks run in strange order — Suraj Kurapati <redmine@...>

Bug #4400: nested at_exit hooks run in strange order

12 messages 2011/02/15

[ruby-core:35255] [Ruby 1.9-Bug#4401][Open] override :method method breaks Psych

From: Lin Jen-Shin <redmine@...>
Date: 2011-02-15 15:12:27 UTC
List: ruby-core #35255
Bug #4401: override :method method breaks Psych
http://redmine.ruby-lang.org/issues/show/4401

Author: Lin Jen-Shin
Status: Open, Priority: Normal
Assigned to: Aaron Patterson, Category: ext, Target version: 1.9.x
ruby -v: ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-darwin10.5.0]

I am not sure if this could be considered a bug, but it used to work.
To reproduce it:

ruby -r psych -v -e 'Psych.dump(Struct.new(:method).new)'
ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-darwin10.5.0]
/usr/local/Cellar/ruby/1.9.2-p136/lib/ruby/1.9.1/psych/visitors/yaml_tree.rb:48:in `method': wrong number of arguments(1 for 0) (ArgumentError)
        from /usr/local/Cellar/ruby/1.9.2-p136/lib/ruby/1.9.1/psych/visitors/yaml_tree.rb:48:in `accept'
        from /usr/local/Cellar/ruby/1.9.2-p136/lib/ruby/1.9.1/psych/visitors/yaml_tree.rb:36:in `<<'
        from /usr/local/Cellar/ruby/1.9.2-p136/lib/ruby/1.9.1/psych.rb:165:in `dump'
        from -e:1:in `<main>'

I don't have a good idea how to fix it,
but here's some demonstration:

https://github.com/godfat/ruby/commit/f4e0e8f781b05c767ad2472a43a4ed0727a75708
https://github.com/godfat/ruby/commit/c7a6cf975d88828c2ed27d253f41c480f9b66ad6

Patches attached as well, the same as above two commits.
I think they are against r30885.

Many thanks!

p.s. this issue was found in delayed_job's:
class PerformableMethod < Struct.new(:object, :method, :args)


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

In This Thread

Prev Next