You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
module Mod
extend ActiveSupport::Concern
included do
cattr_accessor :var
@@var = 1
end
end
class Super
include Mod
end
class Sub < Super; end
puts Super.var
puts Sub.var
module Mod2
extend ActiveSupport::Concern
included do
cattr_accessor :var
self.var = 1
end
end
class Super2
include Mod2
end
class Sub2 < Super2; end
puts Super2.var
puts Sub2.var
require 'pp'
pp({
"Super" => Super.var,
"Sub" => Sub.var,
"Super2" => Super2.var,
"Sub2" => Sub2.var
})
The text was updated successfully, but these errors were encountered:
The following code will give different results when run in MRI vs. Jruby.
using:
Code:
The text was updated successfully, but these errors were encountered: