Project

General

Profile

Actions

Bug #13623

closed

meta-programming, adding sub-module fails with syntax error

Added by caschip (Aad Schippers) about 8 years ago. Updated about 8 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-linux]
[ruby-core:81528]

Description

The goal is to add a sub-module to a higher level module. The higher level module is derived from its name in a string. This works in one case and gives an unexpected syntax error in another case.

failing_meta:4: syntax error, unexpected '\n', expecting &. or :: or '[' or '.'
failing_meta:8: syntax error, unexpected keyword_end, expecting end-of-input

Files

no_meta (72 Bytes) no_meta Gets to the goal without meta-programming caschip (Aad Schippers), 06/02/2017 02:35 PM
working_meta (82 Bytes) working_meta Gets to the goal with meta-programming caschip (Aad Schippers), 06/02/2017 02:35 PM
failing_meta (95 Bytes) failing_meta Fails to get to the goal. Gives a syntax error caschip (Aad Schippers), 06/02/2017 02:35 PM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0