Details

    • Number of attachments :
      0

      Description

      This is a case from Ruboto, but research shows it surfaces regularly. How can I send a block of Ruby code to a Java receiver without using a direct reference?

      We can send the code as a string, and that is ok, but the code is then not parsed and analysed for syntax and semantic errors in the editor or the runtime.

      We do not need the local binding in our case. We only use it to define methods on the receiving end.

      The initial naive effort was to serialize RubyProc. Is that viable?

      Any ideas?

        Activity

        Hide
        Uwe Kubosch added a comment -

        For the original problem, we have gone another way, so serialization is not necessary. However, during research we found these prior efforts, and we did develop a solution for getting the source of a proc based on Florian's code.

        http://ruby.11.n6.nabble.com/Ruby-Serialization-td3449703.html
        http://www.rubyquiz.com/quiz38.html

        Our solution did not include local binding but was fully sufficient for solving the problem.

        Show
        Uwe Kubosch added a comment - For the original problem, we have gone another way, so serialization is not necessary. However, during research we found these prior efforts, and we did develop a solution for getting the source of a proc based on Florian's code. http://ruby.11.n6.nabble.com/Ruby-Serialization-td3449703.html http://www.rubyquiz.com/quiz38.html Our solution did not include local binding but was fully sufficient for solving the problem.

          People

          • Assignee:
            Unassigned
            Reporter:
            Uwe Kubosch
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: