-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
self no longer works with PlainBackend #303
Comments
Could you please explain more about this point? |
If, inside a notebook, I try including a module, I receive a module Foo
def bar
puts "baz"
end
end
include Foo
# NoMethodError: undefined method `include' for #<Object:0x00007f87fc58d960 @prompt={:PROMPT_I=>"3.0.1 :%03n > ", :PROMPT_S=>"3.0.1 :%03n%l> ", :PROMPT_C=>"3.0.1 :%03n > ", :PROMPT_N=>"3.0.1 :%03n?> ", :RETURN=>" => %s \n", :AUTO_INDENT=>true}>
# (irb):in `<main>' In version 0.5, this used to work fine. And in any regular irb shell it works, too. Extending the module instead seems to work though: extend Foo
# #<Object:0x00007f87fc58d960 @prompt={:PROMPT_I=>"3.0.1 :%03n > ", :PROMPT_S=>"3.0.1 :%03n%l> ", :PROMPT_C=>"3.0.1 :%03n > ", :PROMPT_N=>"3.0.1 :%03n?> ", :RETURN=>" => %s \n", :AUTO_INDENT=>true}>
bar
# baz |
I see. I understand. |
@UliKuch Thank you for reporting this issue. This is bug. I'll fix it asap. |
@UliKuch Please try the version 0.7.2. |
Works great! Thanks! |
Including a module now works fine, thanks a lot @mrkn ! |
Hi!
Thanks for maintaining this Gem, I really enjoy using Jupyter notebooks with Ruby 🙂
Unfortunately, when using the
PlainBackend
in version 0.6 or 0.7 together with Ruby 3.0.1, I am having issues with theself
object. It no longer evaluates tomain
, but to some other object:As I verified by running the line in an irb session, the object seems to be the one created by
iruby/lib/iruby/backend.rb
Line 42 in fb20cc3
Because of this, I can no longer include any modules inside a notebook.
When I remove the
dup
in the quoted line, everything seemed to work fine, but I am not sure if that breaks anything else.Or am I missing some error on my part here? I am running my notebooks via the jupyter_on_rails gem, but the issue does not seem to lie there.
The text was updated successfully, but these errors were encountered: