Title: Documentation for ScriptingContainer.runScriptlet ambiguous · Issue #3583 · jruby/jruby · GitHub
Open Graph Title: Documentation for ScriptingContainer.runScriptlet ambiguous · Issue #3583 · jruby/jruby
X Title: Documentation for ScriptingContainer.runScriptlet ambiguous · Issue #3583 · jruby/jruby
Description: The documentation for ScriptingContainer.runScriptlet says: public Object runScriptlet(String script) Evaluates a script under the current scope (perhaps the top-level scope) and returns a result only if a script returns a value. Right a...
Open Graph Description: The documentation for ScriptingContainer.runScriptlet says: public Object runScriptlet(String script) Evaluates a script under the current scope (perhaps the top-level scope) and returns a result o...
X Description: The documentation for ScriptingContainer.runScriptlet says: public Object runScriptlet(String script) Evaluates a script under the current scope (perhaps the top-level scope) and returns a result o...
Opengraph URL: https://github.com/jruby/jruby/issues/3583
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Documentation for ScriptingContainer.runScriptlet ambiguous","articleBody":"The documentation for ScriptingContainer.runScriptlet says:\n\n public Object runScriptlet(String script)\n\n Evaluates a script under the current scope (perhaps the top-level scope) and returns a result only if a script returns a value. Right after the parsing, the script is evaluated once.\n\nThe wording \"returns a result only if a script returns a value\" is fuzzy and doesn't really tell us what is going on, for the following reasons:\n\n(1) \"if a script returns a value\" -> Under what condition does a script NOT return a value? Every Ruby Script returns a value (even if the value is nil), However, we have three cases, where the effect needs to be clarified (and which might, or might not, fall under the case \"not returning a value\":\n- An empty script (i.e. consisting of white space only); maybe it returns nil, but this is not necessary the case and should be documented.\n- A script with a syntax error\n- The case where the script can't be found\n\n(2) \"returns a result only\" -> Assuming that (1) does not hold, i.e. the script \"does not return a value\" for whatever reason. Does this mean that the returned Java Object is null, or does it mean that a RuntimeException is thrown?\n\n(3) Consider a Ruby script which explicitly returns nil (i.e. its last statement evaluates to nil). Will then the return value in Java null, or will the object be in fact a RubyObject, which _contains_ the value null?\n\nThe documentation should give clear answers to these three points.\n","author":{"url":"https://github.com/rovf","@type":"Person","name":"rovf"},"datePublished":"2016-01-07T09:52:10Z","url":"https://github.com/jruby/jruby/issues/3583"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6a522bbf-428a-24bc-f616-b960891d3d44 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CEDA:2DB496:D2E2F3:10C566E:6B037C04 |
| html-safe-nonce | ea635e12d91ad66088cb19d3c96732793b7fcef747913c5bbe077d736465d90a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRURBOjJEQjQ5NjpEMkUyRjM6MTBDNTY2RTo2QjAzN0MwNCIsInZpc2l0b3JfaWQiOiIyMDg2OTQ5MTA4MzkzODkxODgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 132fe5564d36ac59161e44516cdd09a284dc73dd0fa3269bb4d4fe6f8048bed0 |
| hovercard-subject-tag | issue:125360629 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/jruby/jruby/3583/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b2b5041c12ed7951f713f15d03f07afb195b9639d107307a4855caac983c2ff8/jruby/jruby/issues/3583 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b2b5041c12ed7951f713f15d03f07afb195b9639d107307a4855caac983c2ff8/jruby/jruby/issues/3583 |
| og:image:alt | The documentation for ScriptingContainer.runScriptlet says: public Object runScriptlet(String script) Evaluates a script under the current scope (perhaps the top-level scope) and returns a result o... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rovf |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/jruby/jruby git https://github.com/jruby/jruby.git |
| octolytics-dimension-user_id | 55687 |
| octolytics-dimension-user_login | jruby |
| octolytics-dimension-repository_id | 168370 |
| octolytics-dimension-repository_nwo | jruby/jruby |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 168370 |
| octolytics-dimension-repository_network_root_nwo | jruby/jruby |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width