18458, 18739 reload ruby dsl, make function call work

Contains two commits that fixes #18458 and #18739.