class HelloWorld
attr_reader :name
def initialize(name = "world")
@name = name
end
def run
puts "Hello, #{name}!"
end
end
HelloWorld.new.run
produces the CFG:

Note that there are two problems here:
- There are no nodes for the
run method.
- It's not immediately obvious which "island" originates from which part of the program. (In this case, the left-most island is the class definition and the call to
HelloWorld.new.run and the right-most island is initialize.