Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

LocalJumpError: yield called out of block (JRuby) #235

Closed
dblock opened this Issue · 9 comments

4 participants

@dblock

Can someone please help me with LTe/grape-rabl#22 and the failure in https://travis-ci.org/LTe/grape-rabl/jobs/21575957?

1) Grape::Rabl layout default proper render with default layout
     Failure/Error: get("/about")
     LocalJumpError:
       yield called out of block
     # ./spec/views/layout_test/layouts/application.rabl:4:in `(eval)'
     # ./spec/../lib/grape-rabl/formatter.rb:21:in `call'
     # ./spec/../lib/grape-rabl/formatter.rb:50:in `rabl'
     # ./spec/../lib/grape-rabl/formatter.rb:17:in `call'
     # ./spec/grape_rabl_layout_spec.rb:28:in `(root)'
  2) Grape::Rabl layout tilt layout is setup proper render with specified layout
     Failure/Error: get("/about")
     LocalJumpError:
       yield called out of block
     # ./spec/views/layout_test/layouts/another.rabl:2:in `(eval)'
     # ./spec/../lib/grape-rabl/formatter.rb:21:in `call'
     # ./spec/../lib/grape-rabl/formatter.rb:50:in `rabl'
     # ./spec/../lib/grape-rabl/formatter.rb:17:in `call'
     # ./spec/grape_rabl_layout_spec.rb:46:in `(root)'

The issue is probably not in tilt, but it's possible.

@dblock

Maybe jruby/jruby#415 is related.

@judofyr
Collaborator

Do you have a smaller test case that fails? Preferably something like this:

tmpl = Tilt::StringTemplate.new { '#{yield}' }
tmpl.render
@dblock

I dug a lot further, it mostly does point at that JRuby issue I referenced, there's nothing wrong with the calling code:

    def node(name, options={}, &block)
      return unless resolve_condition(options)
      result = block.call(@_object)
      ...

Rabl itself doesn't support JRuby (opened nesquena/rabl#544), there're other problems, so I think this issue is moot.

@dblock dblock closed this
@judofyr
Collaborator

Okay. I've seen "yield called out of block" in JRuby before, but I think we've fixed them all. Please re-open if it is indeed Tilt's fault.

@TobiG77

I can reliably reproduce this with jruby-9.0.0.0.pre2 , MRI (2.2.2) and jruby-1.7.19 both work fine

with the new aws-sdk , v=2.0.47

irb(main):035:0> object = s3.bucket(ENV['AWS_BUCKET']).object('hello-world/hello-world.tar.gz')
=> #<Aws::S3::Object bucket_name="xyz", key="hello-world/hello-world.tar.gz">
irb(main):036:0> object.upload_file('./hello-world.tar.gz')
LocalJumpError: yield called out of block
        from org/jruby/RubyProc.java:303:in `call'
        from org/jruby/RubyYielder.java:101:in `yield'
        from /home/developer/.rbenv/versions/jruby-9.0.0.0.pre2/lib/ruby/gems/shared/gems/aws-sdk-core-2.0.47/lib/seahorse/model/shapes.rb:252:in `block in members'
        from org/jruby/RubyArray.java:2308:in `map'
        from /home/developer/.rbenv/versions/jruby-9.0.0.0.pre2/lib/ruby/gems/shared/gems/aws-sdk-core-2.0.47/lib/seahorse/model/shapes.rb:251:in `block in members'
        from org/jruby/RubyProc.java:303:in `call'
        from org/jruby/RubyGenerator.java:102:in `each'
        from org/jruby/RubyEnumerator.java:300:in `each'
        from /home/developer/.rbenv/versions/jruby-9.0.0.0.pre2/lib/ruby/gems/shared/gems/aws-sdk-core-2.0.47/lib/seahorse/model/shapes.rb:282:in `index_members_by_location_name'
        from /home/developer/.rbenv/versions/jruby-9.0.0.0.pre2/lib/ruby/gems/shared/gems/aws-sdk-core-2.0.47/lib/seahorse/model/shapes.rb:275:in `member_by_location_name'
        from /home/developer/.rbenv/versions/jruby-9.0.0.0.pre2/lib/ruby/gems/shared/gems/aws-sdk-core-2.0.47/lib/seahorse/client/plugins/endpoint.rb:54:in `block in apply_path_params'
        from org/jruby/RubyString.java:2409:in `gsub'
        from /home/developer/.rbenv/versions/jruby-9.0.0.0.pre2/lib/ruby/gems/shared/gems/aws-sdk-core-2.0.47/lib/seahorse/client/plugins/endpoint.rb:47:in `apply_path_params'
        from /home/developer/.rbenv/versions/jruby-9.0.0.0.pre2/lib/ruby/gems/shared/gems/aws-sdk-core-2.0.47/lib/seahorse/client/plugins/endpoint.rb:38:in `build_endpoint'
        from /home/developer/.rbenv/versions/jruby-9.0.0.0.pre2/lib/ruby/gems/shared/gems/aws-sdk-core-2.0.47/lib/seahorse/client/plugins/endpoint.rb:30:in `call'
        from /home/developer/.rbenv/versions/jruby-9.0.0.0.pre2/lib/ruby/gems/shared/gems/aws-sdk-core-2.0.47/lib/seahorse/client/plugins/param_validation.rb:22:in `call'
... 1 levels...
        from /home/developer/.rbenv/versions/jruby-9.0.0.0.pre2/lib/ruby/gems/shared/gems/aws-sdk-core-2.0.47/lib/aws-sdk-core/plugins/s3_sse_cpk.rb:18:in `call'
        from /home/developer/.rbenv/versions/jruby-9.0.0.0.pre2/lib/ruby/gems/shared/gems/aws-sdk-core-2.0.47/lib/seahorse/client/plugins/param_conversion.rb:22:in `call'
        from /home/developer/.rbenv/versions/jruby-9.0.0.0.pre2/lib/ruby/gems/shared/gems/aws-sdk-core-2.0.47/lib/aws-sdk-core/plugins/response_paging.rb:10:in `call'
        from /home/developer/.rbenv/versions/jruby-9.0.0.0.pre2/lib/ruby/gems/shared/gems/aws-sdk-core-2.0.47/lib/seahorse/client/plugins/response_target.rb:18:in `call'
        from /home/developer/.rbenv/versions/jruby-9.0.0.0.pre2/lib/ruby/gems/shared/gems/aws-sdk-core-2.0.47/lib/seahorse/client/request.rb:70:in `send_request'
        from /home/developer/.rbenv/versions/jruby-9.0.0.0.pre2/lib/ruby/gems/shared/gems/aws-sdk-core-2.0.47/lib/seahorse/client/base.rb:216:in `block in create_multipart_upload'
        from /home/developer/.rbenv/versions/jruby-9.0.0.0.pre2/lib/ruby/gems/shared/gems/aws-sdk-resources-2.0.47/lib/aws-sdk-resources/services/s3/multipart_file_uploader.rb:42:in `initiate_upload'
        from /home/developer/.rbenv/versions/jruby-9.0.0.0.pre2/lib/ruby/gems/shared/gems/aws-sdk-resources-2.0.47/lib/aws-sdk-resources/services/s3/multipart_file_uploader.rb:33:in `upload'
        from /home/developer/.rbenv/versions/jruby-9.0.0.0.pre2/lib/ruby/gems/shared/gems/aws-sdk-resources-2.0.47/lib/aws-sdk-resources/services/s3/file_uploader.rb:32:in `upload'
        from /home/developer/.rbenv/versions/jruby-9.0.0.0.pre2/lib/ruby/gems/shared/gems/aws-sdk-resources-2.0.47/lib/aws-sdk-resources/services/s3/object.rb:102:in `upload_file'
        from (irb):36:in `<eval>'
        from org/jruby/RubyKernel.java:1005:in `eval'
        from org/jruby/RubyKernel.java:1315:in `loop'
        from org/jruby/RubyKernel.java:1125:in `catch'
        from org/jruby/RubyKernel.java:1125:in `catch'
        from /home/developer/.rbenv/versions/jruby-9.0.0.0.pre2/bin/irb:13:in `<top>'irb(main):037:0> 
irb(main):038:0* 
@judofyr
Collaborator

@TobiG77: I don't think this is caused by Tilt. I've opened an issue for you over at the JRuby project: jruby/jruby#3009

@TobiG77

Thanks, indeed.

@headius

@dblock Can you comment at jruby/jruby#3009 with a more complete script that causes this?

@dblock

This has been a million years :) Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.