[#72745] [Ruby trunk - Misc #11876] [Closed] Scheduled maintenance 2016/01/01 — shibata.hiroshi@...
Issue #11876 has been updated by Hiroshi SHIBATA.
shibata.hiroshi@gmail.com wrote:
[#72824] [Ruby trunk - Bug #11973] IO#advise should raise NotImplementedError on platforms that do not support that call — git@...
Issue #11973 has been updated by Chuck Remes.
[#72954] [Ruby trunk - Feature #12010] [Assigned] Exclude dot and dotdot from Dir#each — naruse@...
Issue #12010 has been reported by Yui NARUSE.
naruse@airemix.jp wrote:
[#73313] [Ruby trunk - Bug #12007] [Open] Newly added Unicode data file doesn't get downloaded — shugo@...
Issue #12007 has been updated by Shugo Maeda.
[#73372] [Ruby trunk - Misc #12004] Code of Conduct — benton@...
Issue #12004 has been updated by Benton Barnett.
On Sun, Jan 24, 2016 at 5:13 PM, <benton@bentonbarnett.com> wrote:
[#73421] [Ruby trunk - Misc #12004] Code of Conduct — nekocat432@...
Issue #12004 has been updated by Ruby Dino.
I’m sorry, but this, like the code of merit, is merely a derailing tactic.
On 2016/01/26 01:32, Austin Ziegler wrote:
On Tue, Jan 26, 2016 at 12:25 AM, Martin J. Dürst <duerst@it.aoyama.ac.jp>
[#73491] [Ruby trunk - Misc #12004] Code of Conduct — git@...
Issue #12004 has been updated by Chuck Remes.
They will never provide any numbers because they are not engineers and they
Coraline is a panelist on Ruby rogues and a very well respected member of
OK, sorry for previous comment. Let's try this way.
On Tue, Jan 26, 2016 at 5:15 PM, Andrew Kirilenko <
[#73558] [Ruby trunk - Misc #12004] Code of Conduct — andrew.kirilenko@...
Issue #12004 has been updated by Andrew Kirilenko.
Andrew, please stop digging. Your hole is only getting deeper.
>Andrew, please stop digging. Your hole is only getting deeper.
[#73586] [Ruby trunk - Misc #12004] Code of Conduct — andrew@...
Issue #12004 has been updated by Andrew Vit.
[#73593] [Ruby trunk - Bug #12034] RegExp does not respect file encoding directive — nobu@...
Issue #12034 has been updated by Nobuyoshi Nakada.
[ruby-core:73556] [Ruby trunk - Bug #12030] [Open] Crash calling Hash#dig when hash contains ActiveRecord objects
Issue #12030 has been reported by Leon Miller-Out.
----------------------------------------
Bug #12030: Crash calling Hash#dig when hash contains ActiveRecord objects
https://bugs.ruby-lang.org/issues/12030
* Author: Leon Miller-Out
* Status: Open
* Priority: Normal
* Assignee:
* ruby -v: ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
This code results in a stack consistency error:
~~~
begin
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
ruby '2.3.0'
source 'https://rubygems.org'
gem 'activerecord', '4.2.5'
end
require 'active_record'
{ foo: ActiveRecord::Base }.dig(:foo, :bar)
~~~
## Output
~~~
crash.rb:5: [BUG] Stack consistency error (sp: 3, bp: 4)
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin13]
[snip]
-- Control frame information -----------------------------------------------
c:0002 p:0050 s:0003 E:001a80 EVAL crash.rb:5 [FINISH]
c:0001 p:0000 s:0002 E:000cd0 (none) [FINISH]
-- Ruby level backtrace information ----------------------------------------
crash.rb:5:in `<main>'
-- C level backtrace information -------------------------------------------
0 ruby 0x000000010a3aa1e4 rb_vm_bugreport + 388
1 ruby 0x000000010a248aa5 rb_bug + 485
2 ruby 0x000000010a38abc3 vm_exec_core + 13315
3 ruby 0x000000010a39b1f9 vm_exec + 121
4 ruby 0x000000010a251ef4 ruby_exec_internal + 148
5 ruby 0x000000010a251e1e ruby_run_node + 78
6 ruby 0x000000010a20820f main + 79
~~~
## Expected output
~~~
crash.rb:5:in `dig': #<Class:ActiveRecord::Base> does not have #dig method (TypeError)
~~~
## Notes
In addition to crashing when trying to dig into ActiveRecord::Base, it will crash trying to dig into a child class of ActiveRecord::Base, or into an instance of a child class of ActiveRecord::Base. Putting AR objects into hashes is probably a common practice in Rails apps, and users will dig too far into those hashes by accident (as I did!)
More realistic production code could look more like:
~~~
class User < ActiveRecord::Base; end
{ foo: User.first }.dig(:foo, :bar)
~~~
This bug has also been reproduced on: ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux-gnu]
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>