@@ -559,6 +559,21 @@ var PY3_EXAMPLES = {
559559 nonlocalLink : "example-code/nonlocal.txt" ,
560560}
561561
562+ var RUBY_EXAMPLES = {
563+ rubyBlocksLink : 'ruby-example-code/blocks-basic.rb' ,
564+ rubyBlocksScopingLink : 'ruby-example-code/blocks-scoping-2.rb' ,
565+ rubyInheritanceLink : 'ruby-example-code/class-inheritance.rb' ,
566+ rubyConstantsLink : 'ruby-example-code/constants-4.rb' ,
567+ rubyContainersLink : 'ruby-example-code/container-data-types.rb' ,
568+ rubyGlobalsLink : 'ruby-example-code/globals.rb' ,
569+ rubyLambdaScopingLink : 'ruby-example-code/lambda-scoping-2.rb' ,
570+ rubyMegagreeterLink : 'ruby-example-code/megagreeter.rb' ,
571+ rubyProcLink : 'ruby-example-code/proc-basic.rb' ,
572+ rubyProcScopingLink : 'ruby-example-code/proc-scoping.rb' ,
573+ rubySymbolsLink : 'ruby-example-code/symbols.rb' ,
574+ rubyToplevelLink : 'ruby-example-code/toplevel-inst-class-vars.rb' ,
575+ } ;
576+
562577var chatBox = undefined ;
563578function createChatBox ( ) {
564579 assert ( ! chatBox ) ;
@@ -639,6 +654,9 @@ $(document).ready(function() {
639654 } else if ( JAVA_EXAMPLES [ myId ] !== undefined ) {
640655 exFile = JAVA_EXAMPLES [ myId ] ;
641656 lang = 'java' ;
657+ } else if ( RUBY_EXAMPLES [ myId ] !== undefined ) {
658+ exFile = RUBY_EXAMPLES [ myId ] ;
659+ lang = 'ruby' ;
642660 } else if ( PY2_EXAMPLES [ myId ] !== undefined ) {
643661 exFile = PY2_EXAMPLES [ myId ] ;
644662
0 commit comments