File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -70,13 +70,13 @@ export default function (Blockly) {
7070 Blockly . Ruby . data_itemoflist = function ( block ) {
7171 const index = Blockly . Ruby . valueToCode ( block , 'INDEX' , Blockly . Ruby . ORDER_INDEX ) - 1 || 0 ;
7272 const list = Blockly . Ruby . listName ( block . getFieldValue ( 'LIST' ) ) ;
73- return `${ list } [${ index } ]\n` ;
73+ return [ `${ list } [${ index } ]` , Blockly . Ruby . ORDER_FUNCTION_CAL ] ;
7474 } ;
7575
7676 Blockly . Ruby . data_itemnumoflist = function ( block ) {
7777 const item = Blockly . Ruby . valueToCode ( block , 'ITEM' , Blockly . Ruby . ORDER_NONE ) || '0' ;
7878 const list = Blockly . Ruby . listName ( block . getFieldValue ( 'LIST' ) ) ;
79- return `${ list } .index(${ item } )` ;
79+ return [ `${ list } .index(${ item } )` , Blockly . Ruby . ORDER_FUNCTION_CAL ] ;
8080 } ;
8181
8282 Blockly . Ruby . data_lengthoflist = function ( block ) {
Original file line number Diff line number Diff line change @@ -346,15 +346,15 @@ export default function (Blockly) {
346346 } ;
347347
348348 Blockly . Ruby . variableName = function ( name ) {
349- let variable = this . editingTarget . lookupOrCreateVariable ( name ) ;
349+ const variable = this . editingTarget . lookupOrCreateVariable ( name ) ;
350350 if ( variable ) {
351351 return variable . name ;
352352 }
353353 return null ;
354354 } ;
355355
356356 Blockly . Ruby . listName = function ( name ) {
357- let list = this . editingTarget . lookupOrCreateList ( name ) ;
357+ const list = this . editingTarget . lookupOrCreateList ( name ) ;
358358 if ( list ) {
359359 return list . name ;
360360 }
You can’t perform that action at this time.
0 commit comments