René's URL Explorer Experiment


Title: Get receiver object for different levels of calling stack · mruby/mruby · Discussion #6072 · GitHub

Open Graph Title: Get receiver object for different levels of calling stack · mruby/mruby · Discussion #6072

X Title: Get receiver object for different levels of calling stack · mruby/mruby · Discussion #6072

Description: Get receiver object for different levels of calling stack

Open Graph Description: In cruby there is the gem binding_of_caller which can provide the calling object for different levels of the calling stack e.g. binding.of_caller(2).eval("self") Can I get this info also for mruby ?

X Description: In cruby there is the gem binding_of_caller which can provide the calling object for different levels of the calling stack e.g. binding.of_caller(2).eval("self") Can I get this info also ...

Opengraph URL: https://github.com/mruby/mruby/discussions/6072

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"QAPage","mainEntity":{"@type":"Question","name":"Get receiver object for different levels of calling stack","text":"

In cruby there is the gem binding_of_caller which can provide the calling object for different levels of the calling stack
\ne.g.

\n

binding.of_caller(2).eval(\"self\")

\n

Can I get this info also for mruby ?

","upvoteCount":1,"answerCount":2,"acceptedAnswer":{"@type":"Answer","text":"

I can think of two things.

\n\n

And, there was a mistake in #6072 (comment).
\nSince the current ci needs to be removed, the range is 0 <= caller_level < (mrb->c->ci - mrb->c->cibase) and is obtained as mrb->c->ci[-1 - caller_level].

","upvoteCount":0,"url":"https://github.com/mruby/mruby/discussions/6072#discussioncomment-7209447"}}}

route-pattern/:user_id/:repository/discussions/:number(.:format)
route-controllerdiscussions
route-actionshow
fetch-noncev2:89ad0fc9-5db4-e8e4-574a-bd9d4d2ae9a6
current-catalog-service-hash9f0abe34da433c9b6db74bffa2466494a717b579a96b30a5d252e5090baea7be
request-id9492:154085:92A1E30:C29DA92:696E08D0
html-safe-noncea190e467414ed15d0a5862cedf948c1896dc1e009617edab8b624b1176de2885
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NDkyOjE1NDA4NTo5MkExRTMwOkMyOURBOTI6Njk2RTA4RDAiLCJ2aXNpdG9yX2lkIjoiOTA0NTAyODQzOTM5NDc0ODYyNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac8d81e4d559706f8ffabde481bcef6117c0c990435080b1890792349c5302bb4d
hovercard-subject-tagdiscussion:5699933
github-keyboard-shortcutsrepository,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///discussions/show
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/mruby/mruby/discussions/6072
twitter:imagehttps://opengraph.githubassets.com/85f5669f27509c7309648c52d46503cb5722e312dc5903ad42f836dfeaf77fda/mruby/mruby/discussions/6072
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/85f5669f27509c7309648c52d46503cb5722e312dc5903ad42f836dfeaf77fda/mruby/mruby/discussions/6072
og:image:altIn cruby there is the gem binding_of_caller which can provide the calling object for different levels of the calling stack e.g. binding.of_caller(2).eval("self") Can I get this info also for mruby ?
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None9b5131b207ddd175abf059a848d5f4302ec0606b02211b989013be49cf08593e
turbo-cache-controlno-preview
go-importgithub.com/mruby/mruby git https://github.com/mruby/mruby.git
octolytics-dimension-user_id1796512
octolytics-dimension-user_loginmruby
octolytics-dimension-repository_id4073516
octolytics-dimension-repository_nwomruby/mruby
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id4073516
octolytics-dimension-repository_network_root_nwomruby/mruby
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasef8590a63bfc8093b241930ca57d536c9a50f9680
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmruby%2Fmruby%2Fdiscussions%2F6072
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmruby%2Fmruby%2Fdiscussions%2F6072
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fdiscussions%2Fshow&source=header-repo&source_repo=mruby%2Fmruby
Reloadhttps://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072
Reloadhttps://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072
Reloadhttps://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072
mruby https://patch-diff.githubusercontent.com/mruby
mrubyhttps://patch-diff.githubusercontent.com/mruby/mruby
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fmruby%2Fmruby
Fork 827 https://patch-diff.githubusercontent.com/login?return_to=%2Fmruby%2Fmruby
Star 5.5k https://patch-diff.githubusercontent.com/login?return_to=%2Fmruby%2Fmruby
Code https://patch-diff.githubusercontent.com/mruby/mruby
Issues 129 https://patch-diff.githubusercontent.com/mruby/mruby/issues
Pull requests 43 https://patch-diff.githubusercontent.com/mruby/mruby/pulls
Discussions https://patch-diff.githubusercontent.com/mruby/mruby/discussions
Actions https://patch-diff.githubusercontent.com/mruby/mruby/actions
Projects 0 https://patch-diff.githubusercontent.com/mruby/mruby/projects
Wiki https://patch-diff.githubusercontent.com/mruby/mruby/wiki
Security Uh oh! There was an error while loading. Please reload this page. https://patch-diff.githubusercontent.com/mruby/mruby/security
Please reload this pagehttps://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072
Insights https://patch-diff.githubusercontent.com/mruby/mruby/pulse
Code https://patch-diff.githubusercontent.com/mruby/mruby
Issues https://patch-diff.githubusercontent.com/mruby/mruby/issues
Pull requests https://patch-diff.githubusercontent.com/mruby/mruby/pulls
Discussions https://patch-diff.githubusercontent.com/mruby/mruby/discussions
Actions https://patch-diff.githubusercontent.com/mruby/mruby/actions
Projects https://patch-diff.githubusercontent.com/mruby/mruby/projects
Wiki https://patch-diff.githubusercontent.com/mruby/mruby/wiki
Security https://patch-diff.githubusercontent.com/mruby/mruby/security
Insights https://patch-diff.githubusercontent.com/mruby/mruby/pulse
Answered https://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072#discussioncomment-7209447
dearbluehttps://patch-diff.githubusercontent.com/dearblue
lemmuh https://patch-diff.githubusercontent.com/lemmuh
Q&Ahttps://patch-diff.githubusercontent.com/mruby/mruby/discussions/categories/q-a
Get receiver object for different levels of calling stack https://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072#top
lemmuh https://patch-diff.githubusercontent.com/lemmuh
Answered https://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072#discussioncomment-7209447
dearbluehttps://patch-diff.githubusercontent.com/dearblue
Return to tophttps://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072#top
Please reload this pagehttps://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072
https://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072
lemmuh https://patch-diff.githubusercontent.com/lemmuh
Oct 4, 2023 https://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072#discussion-5699933
Give feedback.https://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072
dearblue https://patch-diff.githubusercontent.com/dearblue
Oct 6, 2023 https://github.com/mruby/mruby/discussions/6072#discussioncomment-7209447
#6072 (comment)https://github.com/mruby/mruby/discussions/6072#discussioncomment-7198251
View full answer https://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072#discussioncomment-7209447
Oldest https://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072?sort=old
Newest https://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072?sort=new
Top https://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072?sort=top
Please reload this pagehttps://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072
https://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072
Please reload this pagehttps://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072
https://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072
dearblue https://patch-diff.githubusercontent.com/dearblue
Oct 5, 2023 https://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072#discussioncomment-7198251
Give feedback.https://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072
https://patch-diff.githubusercontent.com/lemmuh
Please reload this pagehttps://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072
https://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072
lemmuhhttps://patch-diff.githubusercontent.com/lemmuh
Oct 5, 2023 https://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072#discussioncomment-7199452
Give feedback.https://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072
https://patch-diff.githubusercontent.com/dearblue
Please reload this pagehttps://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072
https://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072
dearbluehttps://patch-diff.githubusercontent.com/dearblue
Oct 6, 2023 https://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072#discussioncomment-7209447
#6072 (comment)https://github.com/mruby/mruby/discussions/6072#discussioncomment-7198251
Give feedback.https://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072
lemmuhhttps://patch-diff.githubusercontent.com/lemmuh
https://patch-diff.githubusercontent.com/lemmuh
Please reload this pagehttps://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072
https://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072
Please reload this pagehttps://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072
https://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072
lemmuhhttps://patch-diff.githubusercontent.com/lemmuh
Oct 9, 2023 https://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072#discussioncomment-7228024
Give feedback.https://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072
Please reload this pagehttps://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072
https://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072
Please reload this pagehttps://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072
https://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072
lemmuh https://patch-diff.githubusercontent.com/lemmuh
Oct 9, 2023 https://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072#discussioncomment-7228089
Give feedback.https://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072
https://patch-diff.githubusercontent.com/dearblue
Please reload this pagehttps://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072
https://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072
dearbluehttps://patch-diff.githubusercontent.com/dearblue
Oct 9, 2023 https://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072#discussioncomment-7229262
https://docs.github.com/en/discussions/collaborating-with-your-community-using-discussions/participating-in-a-discussion#marking-a-comment-as-an-answerhttps://docs.github.com/en/discussions/collaborating-with-your-community-using-discussions/participating-in-a-discussion#marking-a-comment-as-an-answer
#6073https://github.com/mruby/mruby/issues/6073
Give feedback.https://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072
Sign up for freehttps://patch-diff.githubusercontent.com/join?source=comment-repo
Sign in to commenthttps://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmruby%2Fmruby%2Fdiscussions%2F6072
🙏 Q&A https://patch-diff.githubusercontent.com/mruby/mruby/discussions/categories/q-a
https://patch-diff.githubusercontent.com/lemmuh
https://patch-diff.githubusercontent.com/dearblue
https://patch-diff.githubusercontent.com/mruby/mruby/discussions/6072
https://patch-diff.githubusercontent.com/settings/replies?return_to=1
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.